MediumGHSA-vf2m-468p-8v99CVE-2026-42036

Axios: HTTP adapter streamed responses bypass maxContentLength

Published 5 May 2026 · Updated 10 Sept 2026

Is your project on an affected axios?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Affected packages

Affected
>=1.0.0 <1.15.1
Fixed in
1.15.1
Update to the fixed version for your release line, for example:npm install axios@1.15.1
Affected
<0.31.1
Fixed in
0.31.1
Update to the fixed version for your release line, for example:npm install axios@0.31.1

Details

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.

Is GHSA-vf2m-468p-8v99 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected axios, and gives you the command that fixes it.

More advisories for axios

  • MediumCVE-2026-101904Axios: Header Injection via Inherited headers After Minimal Interceptor · 30 Sept 2026
  • MediumCVE-2026-101900Axios: Fetch Adapter Header Injection via Inherited FormData getHeaders · 30 Sept 2026
  • HighCVE-2026-101905Axios: Node HTTP adapter prototype-pollution gadget allows request socket hijack via inherited createConnection · 30 Sept 2026
  • MediumCVE-2026-101899Axios: CIDR-form NO_PROXY entries are ignored, causing proxy exclusion bypass for internal IP ranges · 30 Sept 2026
  • HighCVE-2026-101907Axios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRF · 30 Sept 2026
  • MediumCVE-2026-101908Axios: Prototype pollution gadget in fetch adapter can alter outbound requests · 30 Sept 2026
All 56 advisories for axios

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.