{"id":"CVE-2026-42034","aliases":["CVE-2026-42034","GHSA-5c9x-8gcm-mpgx"],"related":[],"kind":"vulnerability","state":"published","title":"Axios: HTTP adapter streamed uploads bypass maxBodyLength when maxRedirects: 0","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nFor 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.\n\n### Details\n\nRelevant flow in lib/adapters/http.js:\n  - 556-564: maxBodyLength check applies only to buffered/non-stream data.\n  - 681-682: maxRedirects === 0 selects native http/https transport.\n  - 694-699: options.maxBodyLength is set, but native transport does not enforce it.\n  - 925-945: stream is piped directly to socket (data.pipe(req)) with no Axios byte counting.\n\nThis creates a path-specific bypass for streamed uploads.\n\n  ### PoC\n\nEnvironment:\n\n  - Axios main at commit f7a4ee2\n  - Node v24.2.0\n\n  Steps:\n  1. Start an HTTP server that counts uploaded bytes and returns {received}.\n  2. Send a 2 MiB Readable stream with:\n      - adapter: 'http'\n      - maxBodyLength: 1024\n      - maxRedirects: 0\n\n  Observed:\n  - Request succeeds; server reports received: 2097152.\n\n  Control checks:\n  - Same stream with default/nonzero redirects: rejected with ERR_FR_MAX_BODY_LENGTH_EXCEEDED.\n  - Buffered body with maxRedirects: 0: rejected with ERR_BAD_REQUEST.\n\n  ### Impact\nType: DoS / uncontrolled upstream upload / resource exhaustion.\nImpacted: Node.js services using streamed request bodies with maxBodyLength expecting hard enforcement, especially when following Axios guidance to use maxRedirects: 0 for streams.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-04-24T17:59:47.802Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"version":">= 1.0.0, < 1.15.1","status":"affected"},{"version":"< 0.31.1","status":"affected"}],"vendor":"axios","product":"axios","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.15.1"}],"ecosystem":"npm","package":"axios","purl":"pkg:npm/axios","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.31.1"}],"ecosystem":"npm","package":"axios","purl":"pkg:npm/axios","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.31.1"},{"status":"affected","introduced":"1.0.0","fixed":"1.15.1"}],"vendor":"axios","product":"axios","cpe":"cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/axios/axios/security/advisories/GHSA-5c9x-8gcm-mpgx","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42034","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/axios/axios","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-24T18:12:43.106Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42034","url":"https://www.cve.org/CVERecord?id=CVE-2026-42034","licence":"CVE Terms of Use","modified":"2026-04-24T18:13:14.474Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5c9x-8gcm-mpgx","url":"https://github.com/advisories/GHSA-5c9x-8gcm-mpgx","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:45.707Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42034","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42034","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.556Z","epss":{"score":0.0034,"percentile":0.29453,"date":"2026-12-01T12:00:22.000Z"}}