5.3medium
Axios: HTTP adapter streamed uploads bypass maxBodyLength when maxRedirects: 0
- 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-5c9x-8gcm-mpgx
Description
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, for stream request bodies, maxBodyLength is bypassed when maxRedirects is set to 0 (native http/https transport path). Oversized streamed uploads are sent fully even when the caller sets strict body limits. 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, for stream request bodies, maxBodyLength is bypassed when maxRedirects is set to 0 (native http/https transport path). Oversized streamed uploads are sent fully even when the caller sets strict body limits. This vulnerability is fixed in 1.15.1 and 0.31.1.
GitHub Advisory Database
Summary
For stream request bodies, maxBodyLength is bypassed when maxRedirects is set to 0 (native http/https transport path). Oversized streamed uploads are sent fully even when the caller sets strict body limits.
Details
Relevant flow in lib/adapters/http.js:
- 556-564: maxBodyLength check applies only to buffered/non-stream data.
- 681-682: maxRedirects === 0 selects native http/https transport.
- 694-699: options.maxBodyLength is set, but native transport does not enforce it.
- 925-945: stream is piped directly to socket (data.pipe(req)) with no Axios byte counting.
This creates a path-specific bypass for streamed uploads.
PoC
Environment:
- Axios main at commit f7a4ee2
- Node v24.2.0
Steps:
- Start an HTTP server that counts uploaded bytes and returns {received}.
- Send a 2 MiB Readable stream with:
- adapter: 'http'
- maxBodyLength: 1024
- maxRedirects: 0
Observed:
- Request succeeds; server reports received: 2097152.
Control checks:
- Same stream with default/nonzero redirects: rejected with ERR_FR_MAX_BODY_LENGTH_EXCEEDED.
- Buffered body with maxRedirects: 0: rejected with ERR_BAD_REQUEST.
Impact
Type: DoS / uncontrolled upstream upload / resource exhaustion. Impacted: Node.js services using streamed request bodies with maxBodyLength expecting hard enforcement, especially when following Axios guidance to use maxRedirects: 0 for streams.
NVD (es)
Axios es un cliente HTTP basado en promesas para el navegador y Node.js. Antes de las versiones 1.15.1 y 0.31.1, para los cuerpos de solicitud de tipo stream, se omite maxBodyLength cuando maxRedirects se establece en 0 (ruta de transporte nativa HTTP/HTTPS). Las cargas en flujo de tamaño excesivo se envían completamente incluso cuando el llamador establece límites estrictos para el cuerpo. Esta vulnerabilidad se corrige en las versiones 1.15.1 y 0.31.1.
References
| https://github.com/axios/axios/security/advisories/GHSA-5c9x-8gcm-mpgx | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-42034 | advisory | |
| https://github.com/axios/axios | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42034 changed 2026-04-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5c9x-8gcm-mpgx changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-42034 changed 2026-11-11 | Public domain |