Skip to main content

CVE-2026-42036 — Vulnerability in axios — CVE Details

MEDIUM

Axios: HTTP adapter streamed responses bypass maxContentLength

Published May 5, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.50%). Schedule for your next planned update.

Does your project use an affected axios version?

Paste your package-lock.json to check it for CVE-2026-42036 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

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.

Advisory Timeline

  • First published May 5, 2026 (205 days ago).
  • Last revised September 10, 2026 — 128 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update axios to 1.15.1 or later
npm install axios@1.15.1
npm
Update axios to 0.31.1 or later
npm install axios@0.31.1

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageFixed In
axios npm · Affected: All versions1.15.1
axios npm · Affected: All versions0.31.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-770
    Allocation of Resources Without LimitsMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Frequently Asked Questions

What is CVE-2026-42036?
Axios: HTTP adapter streamed responses bypass maxContentLength. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
How do I check if my project is affected by CVE-2026-42036?
CVE-2026-42036 affects axios. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-42036 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.3

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.50%
EPSS percentile: 35.6

This is a below-median EPSS score — only 35.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-vf2m-468p-8v99

Related CVEs

  • CVE-2026-67320
    HIGH

    Axios Node HTTP adapter can use an inherited proxy after interceptor config cloning

  • CVE-2026-44496
    HIGH

    Axios: Regular Expression Denial of Service (ReDoS) via Cookie Name Injection

  • CVE-2026-44486
    HIGH

    Axios: Proxy-Authorization header leaks to redirect target when proxy is re-evaluated to direct connection

  • CVE-2025-27152
    HIGH

    axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL

  • CVE-2026-40175
    MEDIUM

    Axios has Unrestricted Cloud Metadata Exfiltration via Header Injection Chain

  • CVE-2026-67321
    MEDIUM

    Axios form serializer maxDepth bypass via {} metatoken

  • CVE-2026-101904
    MEDIUM

    Axios: Header Injection via Inherited headers After Minimal Interceptor

  • CVE-2026-67317
    MEDIUM

    Axios: Fetch adapter `ReadableStream` uploads bypass `maxBodyLength`

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json