GHSA-vf2m-468p-8v99

Suggest an improvement
Source
https://github.com/advisories/GHSA-vf2m-468p-8v99
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-vf2m-468p-8v99/GHSA-vf2m-468p-8v99.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vf2m-468p-8v99
Aliases
  • CVE-2026-42036
Downstream
Related
Published
2026-05-05T00:26:57Z
Modified
2026-05-06T15:29:25.221206831Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
Axios: HTTP adapter streamed responses bypass maxContentLength
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.

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-05T00:26:57Z",
    "cwe_ids": [
        "CWE-770"
    ],
    "severity": "MODERATE",
    "nvd_published_at": "2026-04-24T18:16:30Z"
}
References

Affected packages

npm / axios

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Fixed
1.15.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-vf2m-468p-8v99/GHSA-vf2m-468p-8v99.json"

npm / axios

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.31.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-vf2m-468p-8v99/GHSA-vf2m-468p-8v99.json"
last_known_affected_version_range
"<= 0.31.0"