GHSA-fvcv-3m26-pcqx CVE-2026-40175
Axios has Unrestricted Cloud Metadata Exfiltration via Header Injection Chain
- Severity
- 4.8 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 1.95%
- Chance of exploitation in the next 30 days. Higher than 80.22% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
- CWE-444 Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
- CWE-918 Server-Side Request Forgery (SSRF)
- Fix
1.15.0- Upgrade axios to this version or later
Description
Vulnerability Disclosure: Unrestricted Cloud Metadata Exfiltration via Header Injection Chain
Summary
The Axios library is vulnerable to a specific gadget-style attack chain in which prototype pollution in a third-party dependency may be leveraged to inject unsanitized header values into outbound requests.
Axios can be used as a gadget after pollution occurs elsewhere because header values merged from attacker-controlled prototype properties are not sanitized for CRLF (\r\n) characters before being written to the request. In affected deployments, this may enable limited request manipulation or metadata access as part of a higher-complexity exploit chain.
Severity: Moderate (CVSS 3.1 Base Score: 4.8)
Affected Versions: All versions (v0.x - v1.x)
Vulnerable Component: lib/adapters/http.js (Header Processing)
Usage of "Helper" Vulnerabilities
This issue requires a separate prototype pollution vulnerability in another library in the application stack (for example, qs, minimist, ini, or body-parser). If an attacker can pollute Object.prototype, Axios may pick up the polluted properties during config merge.
Because Axios does not sanitise these merged header values for CRLF (\r\n) characters, the polluted property can alter the structure of an outbound HTTP request.
Proof of Concept
1. The Setup (Simulated Pollution)
Imagine a scenario where a known vulnerability exists in a query parser. The attacker sends a payload that sets:
Object.prototype['x-amz-target'] = \"dummy\r\n\r\nPUT /latest/api/token HTTP/1.1\r\nHost: 169.254.169.254\r\nX-aws-ec2-metadata-token-ttl-seconds: 21600\r\n\r\nGET /ignore\";
2. The Gadget Trigger (Safe Code)
The application makes a completely safe, hardcoded request:
// This looks safe to the developer
await axios.get('https://analytics.internal/pings');
3. The Execution
Axios merges the prototype property x-amz-target into the request headers. It then writes the header value directly to the socket without validation.
Resulting HTTP traffic:
GET /pings HTTP/1.1
Host: analytics.internal
x-amz-target: dummy
PUT /latest/api/token HTTP/1.1
Host: 169.254.169.254
X-aws-ec2-metadata-token-ttl-seconds: 21600
GET /ignore HTTP/1.1
...
4. The Impact
In environments where requests can reach cloud metadata endpoints or sensitive internal services, the injected header content may help bypass expected request constraints and expose limited credentials or modify request semantics. This impact depends on application context and a separate prototype-pollution primitive.
Impact Analysis
- Confidentiality: May expose limited sensitive information in affected network environments.
- Integrity: May allow modification of outbound request structure or injected headers.
- Attack Complexity: Exploitation requires a separate prototype-pollution vulnerability and a reachable target service.
Recommended Fix
Validate all header values in lib/adapters/http.js and xhr.js before passing them to the underlying request function.
Patch Suggestion:
// In lib/adapters/http.js
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
if (/[\r\n]/.test(val)) {
throw new Error('Security: Header value contains invalid characters');
}
// ... proceed to set header
});
References
- OWASP: CRLF Injection (CWE-113)
This report was generated as part of a security audit of the Axios library.
Affected versions
npm
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
axios npm → 1.15.0
- npm
npm install axios@1.15.0- yarn
yarn add axios@1.15.0- pnpm
pnpm add axios@1.15.0
Severity breakdown
CVSS 3.1 4.8
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Weakness
CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
How to prevent it
- Implementation: Construct HTTP headers very carefully, avoiding the use of non-validated input data.
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. If an input does not strictly conform to specifications, reject it or transform it into something that conforms. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- Implementation: Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- Implementation: Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.
How to prevent it
- Implementation: Use a web server that employs a strict HTTP parsing procedure, such as Apache [REF-433].
- Implementation: Use only SSL communication.
- Implementation: Terminate the client session after each request.
- System Configuration: Turn all pages to non-cacheable.
CWE-918: Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
References
Advisories
Packages
Other links
- github.com/axios/axios/security/advisories/GHSA-fvcv-3m26-pcqx
- github.com/axios/axios/pull/10660
- github.com/axios/axios/pull/10660
- github.com/axios/axios/pull/10688
- github.com/axios/axios/commit/03cdfc99e8db32a390e12128208b6778492cee9c
- github.com/axios/axios/commit/363185461b90b1b78845dc8a99a1f103d9b122a1
- cert-portal.siemens.com/productcert/html/ssa-876049.html
- github.com/axios/axios/releases/tag/v0.31.0
- github.com/axios/axios/releases/tag/v1.15.0
- access.redhat.com/errata/RHSA-2026:10104
- access.redhat.com/errata/RHSA-2026:10153
- access.redhat.com/errata/RHSA-2026:10172
- access.redhat.com/errata/RHSA-2026:10175
- access.redhat.com/errata/RHSA-2026:11414
- access.redhat.com/errata/RHSA-2026:13542
- access.redhat.com/errata/RHSA-2026:13548
- access.redhat.com/errata/RHSA-2026:13571
- access.redhat.com/errata/RHSA-2026:13826
- access.redhat.com/errata/RHSA-2026:14774
- access.redhat.com/errata/RHSA-2026:14937
- access.redhat.com/errata/RHSA-2026:15091
- access.redhat.com/errata/RHSA-2026:16874
- access.redhat.com/errata/RHSA-2026:17468
- access.redhat.com/errata/RHSA-2026:17474
- access.redhat.com/errata/RHSA-2026:17657
- access.redhat.com/errata/RHSA-2026:17699
- access.redhat.com/errata/RHSA-2026:19712
- access.redhat.com/errata/RHSA-2026:20041
- access.redhat.com/errata/RHSA-2026:20938
- access.redhat.com/errata/RHSA-2026:24762
- access.redhat.com/errata/RHSA-2026:25041
- access.redhat.com/errata/RHSA-2026:36882
- access.redhat.com/errata/RHSA-2026:53661
- access.redhat.com/errata/RHSA-2026:53676
- access.redhat.com/errata/RHSA-2026:53735
- access.redhat.com/errata/RHSA-2026:53736
- access.redhat.com/errata/RHSA-2026:53752
- access.redhat.com/errata/RHSA-2026:53778
- access.redhat.com/errata/RHSA-2026:53789
- access.redhat.com/errata/RHSA-2026:53799
- access.redhat.com/errata/RHSA-2026:53835
- access.redhat.com/errata/RHSA-2026:53840
- access.redhat.com/errata/RHSA-2026:8483
- access.redhat.com/errata/RHSA-2026:8484
- access.redhat.com/errata/RHSA-2026:8490
- access.redhat.com/errata/RHSA-2026:8491
- access.redhat.com/errata/RHSA-2026:8493
- access.redhat.com/errata/RHSA-2026:8499
- access.redhat.com/errata/RHSA-2026:8500
- access.redhat.com/errata/RHSA-2026:8501
- access.redhat.com/errata/RHSA-2026:9742
- access.redhat.com/security/cve/CVE-2026-40175
- bugzilla.redhat.com/show_bug.cgi
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40175.json
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-44g4-m2mj-wpvx Axios: CIDR-form NO_PROXY entries are ignored, causing proxy exclusion bypass for internal IP ranges | Medium | Also affects axios |
| GHSA-x97p-jq2g-jp4f Axios: Prototype Pollution Gadget in axios toFormData Options | High | Also affects axios |
| GHSA-vh66-26gq-q6x8 Axios: Prototype pollution gadget in fetch adapter can alter outbound requests | Medium | Also affects axios |
| GHSA-r4gj-5m52-g5wh Axios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRF | High | Also affects axios |
| GHSA-mghh-pgcx-3jjj Axios: ReDoS (O(N²)) in shouldBypassProxy host normalization, reachable via untrusted redirect Location | High | Also affects axios |
| GHSA-m8m8-qj5v-23w3 Axios: Node HTTP adapter prototype-pollution gadget allows request socket hijack via inherited createConnection | High | Also affects axios |
| GHSA-j8rh-479h-cp32 Axios: Header Injection via Inherited headers After Minimal Interceptor | Medium | Also affects axios |
| GHSA-c29m-xwm3-cm6r Axios: ReDoS in fromDataURI data: URL parser freezes the Node event loop (DoS) | High | Also affects axios |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor