{"id":"GHSA-vf2m-468p-8v99","revision":"3601388f937347e4a288caf6a94346ac","records":[{"revision":"3601388f937347e4a288caf6a94346ac","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-vf2m-468p-8v99","aliases":["CVE-2026-42036"],"title":"Axios: HTTP adapter streamed responses bypass maxContentLength","description":"### Summary\n\nWhen responseType: 'stream' is used, Axios returns the response stream without enforcing maxContentLength. This bypasses configured response-size limits and allows unbounded downstream consumption.\n\n### Details\nIn lib/adapters/http.js:\n  - 786-789: for responseType === 'stream', Axios immediately settles with the stream.\n  - 797-810: maxContentLength enforcement exists only in the non-stream buffering branch.\n\nSo callers may set maxContentLength and still receive/read arbitrarily large streamed responses.\n\n### PoC\n\nEnvironment:\n- Axios main at commit f7a4ee2\n- Node v24.2.0\n\n Steps:\n\n1. Start an HTTP server that returns a 2 MiB response body.\n2. Call Axios with:\n   - adapter: 'http'\n   - responseType: 'stream'\n   - maxContentLength: 1024\n3. Read the returned stream fully.\n\nObserved:\n- Success; full 2097152 bytes readable.\n\nControl check:\n- Same endpoint with responseType: 'text' and same maxContentLength: rejected with maxContentLength size of 1024 exceeded.\n\n### Impact\nType: DoS / unbounded response processing.\nImpacted: Node.js applications relying on maxContentLength as a safety boundary while using streamed Axios responses.","state":0,"publishedAt":"2026-05-05T00:26:57+00:00","modifiedAt":"2026-09-10T03:50:47.6711212+00:00","affected":[{"ecosystem":"npm","name":"axios","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.0.0"},{"kind":"fixed","version":"1.15.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"axios","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.31.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/axios/axios/security/advisories/GHSA-vf2m-468p-8v99","https://nvd.nist.gov/vuln/detail/CVE-2026-42036","https://github.com/axios/axios"],"sourceUrl":"https://github.com/advisories/GHSA-vf2m-468p-8v99","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-vf2m-468p-8v99","identifiers":["GHSA-vf2m-468p-8v99","CVE-2026-42036"]},"retained":false,"historicalAffected":[]}],"coverage":[]}