Junglewise Threat Intelligence

Axios HTTP/2 streamed uploads bypass maxBodyLength

Severity: medium · CVSS 5.3 · Published 2026-08-01

Executive brief

Axios is a popular JavaScript HTTP client library used by many applications to make web requests. When using HTTP/2 with streaming uploads, axios fails to enforce the maxBodyLength limit, allowing attackers to transmit more data than intended. This can lead to excessive bandwidth consumption, cost overruns on egress traffic, and disruption of upstream services that have their own quota limits, but does not directly compromise credentials or enable code execution.

Technical details

The vulnerability is a resource consumption bypass (CWE-400) in axios's HTTP/2 transport adapter. When httpVersion: 2 is specified, axios unconditionally selects the http2Transport path, which bypasses the byte-counting stream wrapper that normally enforces maxBodyLength limits. The wrapper is only applied when maxRedirects === 0, a condition not met by default. Node's native HTTP/2 request API does not honor the maxBodyLength option, so streamed uploads pipe unbounded into the request. Exploitation requires the application to use HTTP/2 (httpVersion: 2), pass a finite maxBodyLength value, and accept attacker-controlled stream data. The default unlimited maxBodyLength: -1 is not affected, nor are browser adapters or HTTP/1.1 requests. Patched versions >=1.18.0 enforce the stream wrapper for all HTTP/2 streamed uploads. As a workaround, setting maxRedirects: 0 activates the wrapper on affected 1.15.1+ versions.

Affected products

  • axios axios >=1.13.0, <1.18.0

Timeline

  • 2026-08-01: disclosed: Duplicate advisory GHSA-fqj3-h9pc-443h published
  • 2026-07-06: advisory: Primary advisory GHSA-mwf2-3pr3-8698 published
  • 2026-07-06: patched: Fixed in axios >=1.18.0

References

Related threats