Impact
Axios, a widely used HTTP client for browsers and Node.js, suffers from a prototype‑pollution vulnerability in its fetch adapter. When constructing a Request object, Axios sanitizes the resolved options, but subsequently calls the native fetch function with the original, unsanitized options. The unsanitized options contain Object.prototype.headers, which, when polluted, inherit through the prototype chain and become the effective headers passed to fetch. This allows an attacker to inject custom headers that override the sanitized Request headers, potentially manipulating Authorization, cache directives, metadata‑service tokens, or other application‑specific headers. The weakness is defined by CWE‑1321 (Prototype Pollution) and CWE‑628 (Insecure Resource Handling), and can compromise the confidentiality and integrity of downstream services if malicious requests reach them.
Affected Systems
Axios versions from 1.7.0 up to and including 1.19.x are vulnerable when the fetch adapter is used. The issue affects both browser and Node.js deployments that create Axios requests via this adapter. Versions 1.20.0 and later incorporate the fix and are no longer susceptible.
Risk and Exploitability
The CVSS score of 6.9 indicates moderate severity, while the EPSS score of less than 1% reveals a very low probability of exploitation at this time; the vulnerability is not listed in the CISA KEV catalogue, suggesting no widespread exploitation yet. Based on the description, the likely attack vector requires an attacker to execute code in the same process as the Axios instance—for example, a compromised Node.js application, a malicious browser extension, or other injected scripts—so that Object.prototype can be polluted before the fetch call. Once the prototype pollution is achieved, the attacker’s headers will be sent in outgoing HTTP requests, potentially enabling unauthorized access or altered application behavior.
OpenCVE Enrichment
Github GHSA