All vulnerabilities

npm

CVE-2026-67318

Axios: HTTP/2 streamed uploads bypass `maxBodyLength`

Severity
Medium
Published
20 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.18.0
Exploit chance
0.6% in the next 30 daysHigher than 50% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)
Also known as
GHSA-mwf2-3pr3-8698
Sources
OSV.dev and GitHub

Description

Axios versions with Node.js HTTP/2 support allow streamed request bodies to bypass maxBodyLength enforcement when requests are sent with httpVersion: 2.

This affects applications that rely on maxBodyLength as a hard cap while forwarding attacker-controlled streams, such as upload endpoints proxying user data to an upstream HTTP/2 service. Buffered request bodies are still checked before the request is sent.

An attacker who can control a stream passed to axios can cause the application to transmit more outbound data than the configured maxBodyLength limit.

Practical impact is limited to resource consumption and policy bypass: excess outbound bandwidth, egress cost, upstream quota consumption, and limited availability impact on the application or upstream peer. This does not provide code execution, credential disclosure, or request destination control.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

For axios >=1.15.1, set maxRedirects: 0 on affected HTTP/2 streamed upload calls. HTTP/2 redirects are not currently supported by the axios HTTP/2 adapter, so this is a practical per-call mitigation for this path.

For earlier affected versions, pre-limit the stream with a byte-counting transform before passing it to axios, reject oversized uploads before forwarding them, or avoid httpVersion: 2 for untrusted streamed uploads.### Summary On Node.js, axios's maxBodyLength is documented as a hard cap on outbound request bodies.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
axiosnpm · osv:npm:axios
  • From 1.13.0 before 1.18.0

About axios

Weekly downloads (npm)
143,624,637npm, 16 Nov 2026

References