CVE-2026-42036
Axios: HTTP adapter streamed responses bypass maxContentLength
Description
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:
- Start an HTTP server that returns a 2 MiB response body.
- Call Axios with:
- adapter: 'http'
- responseType: 'stream'
- maxContentLength: 1024
- 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.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » axiosvia npm axios | < 0.31.1>= 1.0.0, < 1.15.1 | 0.31.1, 1.15.1 |
| org.webjars.npm » axiosvia npm axios | < 0.31.1>= 1.0.0, < 1.15.1 | 0.31.1, 1.15.1 |
Blast radius
15% of the dependent artifacts (7) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 538 |
| 2 hops | 396 |
| 3 hops | 271 |
Most used dependents
- de.tudarmstadt.ukp.inception.app » inception-ui-core24 usages
- org.mvnpm.at.bigbinary » neeto-commons-frontend14 usages
- de.tudarmstadt.ukp.inception.app » inception-ui-dashboard12 usages
- de.tudarmstadt.ukp.inception.app » inception-workload10 usages
- de.tudarmstadt.ukp.inception.app » inception-recommendation9 usages
- de.gematik.test » tiger-test-lib9 usages
- org.mvnpm.at.bigbinary » neeto-atoms7 usages
- org.mvnpm.at.bigbinary » neeto-molecules6 usages
- de.gematik.test » tiger-testenv-mgr6 usages
- org.mvnpm.at.bigbinary » neeto-filters-frontend6 usages
- de.tudarmstadt.ukp.inception.app » inception-websocket6 usages
- de.tudarmstadt.ukp.inception.app » inception-imls-stringmatch4 usages
- org.mvnpm.at.bigbinary » neeto-team-members-frontend4 usages
- org.mvnpm.at.bigbinary » neeto-editor4 usages
- org.mvnpm.at.bigbinary » neeto-image-uploader-frontend4 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-42036 | nvd.nist.gov |
| Package | axios/axios | github.com |
| Web | axios/axios advisory GHSA-vf2m-468p-8v99 | github.com |
