CVE-2026-42036: Axios: HTTP adapter streamed responses bypass maxContentLength

Published Apr 24, 2026
·
Updated

### 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: 1. Start an HTTP server that returns a 2 MiB response body. 2. Call Axios with: - adapter: 'http' - responseType: 'stream' - maxContentLength: 1024 3. 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.

Affected Software

5 affected componentsFixes available
npm/axios<1.15.1, <0.31.1
Axios Axios Node.js<0.31.1
Axios Axios Node.js>=1.0.0<1.15.1
npm/axios<=0.31.0
0.31.1
npm/axios>=1.0.0<1.15.1
1.15.1

Event History

Apr 24, 2026
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeaknessAffected Software
May 5, 2026
Advisory Published
via GitHub·12:26 AM
Data Sourced
via GitHub·12:26 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42036?

CVE-2026-42036 is rated as a moderate severity vulnerability due to its potential impact on application stability and security.

2

How do I fix CVE-2026-42036?

To fix CVE-2026-42036, upgrade Axios to versions 1.15.1 or 0.31.1 or later to enforce maxContentLength correctly.

3

What versions of Axios are affected by CVE-2026-42036?

CVE-2026-42036 affects Axios versions prior to 1.15.1 and 0.31.1.

4

What type of vulnerability is CVE-2026-42036?

CVE-2026-42036 is a vulnerability that allows the bypassing of the maxContentLength setting when using streamed responses.

5

Is CVE-2026-42036 present in the latest Axios releases?

CVE-2026-42036 is not present in the latest versions of Axios released after 1.15.1 and 0.31.1.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203