CVE-2026-42036 — Vulnerability in axios — CVE Details
Axios: HTTP adapter streamed responses bypass maxContentLength
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.50%). 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-42036 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
When responseType: 'stream' is used, Axios returns the response stream without enforcing maxContentLength. This bypasses configured response-size limits and allows unbounded downstream consumption.
Details
In lib/adapters/http.js:
- 786-789: for responseType === 'stream', Axios immediately settles with the stream.
- 797-810: maxContentLength enforcement exists only in the non-stream buffering branch.
So callers may set maxContentLength and still receive/read arbitrarily large streamed responses.
PoC
Environment:
- Axios main at commit f7a4ee2
- Node v24.2.0
Steps:
- Start an HTTP server that returns a 2 MiB response body.
- Call Axios with:
- adapter: 'http'
- responseType: 'stream'
- maxContentLength: 1024
- Read the returned stream fully.
Observed:
- Success; full 2097152 bytes readable.
Control check:
- Same endpoint with responseType: 'text' and same maxContentLength: rejected with maxContentLength size of 1024 exceeded.
Impact
Type: DoS / unbounded response processing. Impacted: Node.js applications relying on maxContentLength as a safety boundary while using streamed Axios responses.
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.1
npm install axios@0.31.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: npm (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-770Allocation of Resources Without LimitsMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
Frequently Asked Questions
- What is CVE-2026-42036?
- Axios: HTTP adapter streamed responses bypass maxContentLength. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2026-42036?
- CVE-2026-42036 affects axios. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-42036 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 35.6% 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-2026-67320HIGH
Axios Node HTTP adapter can use an inherited proxy after interceptor config cloning
- CVE-2026-44496HIGH
Axios: Regular Expression Denial of Service (ReDoS) via Cookie Name Injection
- CVE-2026-44486HIGH
Axios: Proxy-Authorization header leaks to redirect target when proxy is re-evaluated to direct connection
- CVE-2025-27152HIGH
axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL
- CVE-2026-40175MEDIUM
Axios has Unrestricted Cloud Metadata Exfiltration via Header Injection Chain
- CVE-2026-67321MEDIUM
Axios form serializer maxDepth bypass via {} metatoken
- CVE-2026-101904MEDIUM
Axios: Header Injection via Inherited headers After Minimal Interceptor
- CVE-2026-67317MEDIUM
Axios: Fetch adapter `ReadableStream` uploads bypass `maxBodyLength`