5.3medium
Axios: HTTP adapter streamed responses bypass maxContentLength
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.34% (higher than 29% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vf2m-468p-8v99
Description
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, when responseType: 'stream' is used, Axios returns the response stream without enforcing maxContentLength. This bypasses configured response-size limits and allows unbounded downstream consumption. This vulnerability is fixed in 1.15.1 and 0.31.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| axios axios | >= 1.0.0, < 1.15.1, < 0.31.1, before 0.31.1, from 1.0.0 before 1.15.1 | CVE List, NVD |
| axios (npm) | from 1.0.0 before 1.15.1, before 0.31.1 | GitHub Advisory Database |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, when responseType: 'stream' is used, Axios returns the response stream without enforcing maxContentLength. This bypasses configured response-size limits and allows unbounded downstream consumption. This vulnerability is fixed in 1.15.1 and 0.31.1.
GitHub Advisory Database
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.
NVD (es)
Axios es un cliente HTTP basado en promesas para el navegador y Node.js. Antes de 1.15.1 y 0.31.1, cuando se usa responseType: ’stream’, Axios devuelve el flujo de respuesta sin aplicar maxContentLength. Esto omite los límites de tamaño de respuesta configurados y permite un consumo descendente ilimitado. Esta vulnerabilidad está corregida en 1.15.1 y 0.31.1.
References
| https://github.com/axios/axios/security/advisories/GHSA-vf2m-468p-8v99 | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-42036 | advisory | |
| https://github.com/axios/axios | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42036 changed 2026-04-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vf2m-468p-8v99 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-42036 changed 2026-11-11 | Public domain |