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.
Relevant flow in lib/adapters/http.js:
This creates a path-specific bypass for streamed uploads.
Environment:
Steps:
Observed:
Control checks:
Type: DoS / uncontrolled upstream upload / resource exhaustion. Impacted: Node.js services using streamed request bodies with maxBodyLength expecting hard enforcement, especially when following Axios guidance to use maxRedirects: 0 for streams.
{
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-05T00:33:25Z",
"nvd_published_at": "2026-04-24T18:16:30Z",
"severity": "MODERATE"
}