Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

GHSA-5c9x-8gcm-mpgx

MEDIUM

GHSA-5c9x-8gcm-mpgx is a medium-severity (CVSS 5.3) vulnerability in axios. O3 Security confirms whether GHSA-5c9x-8gcm-mpgx is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Axios' HTTP adapter-streamed uploads bypass maxBodyLength when maxRedirects: 0

Also known asCVE-2026-42034
Published
May 5, 2026
Updated
May 6, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of May 6, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

axiosnpm
117.9Mdownloads / week

Description

Summary

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.

Details

Relevant flow in lib/adapters/http.js:

  • 556-564: maxBodyLength check applies only to buffered/non-stream data.
  • 681-682: maxRedirects === 0 selects native http/https transport.
  • 694-699: options.maxBodyLength is set, but native transport does not enforce it.
  • 925-945: stream is piped directly to socket (data.pipe(req)) with no Axios byte counting.

This creates a path-specific bypass for streamed uploads.

PoC

Environment:

  • Axios main at commit f7a4ee2
  • Node v24.2.0

Steps:

  1. Start an HTTP server that counts uploaded bytes and returns {received}.
  2. Send a 2 MiB Readable stream with:
    • adapter: 'http'
    • maxBodyLength: 1024
    • maxRedirects: 0

Observed:

  • Request succeeds; server reports received: 2097152.

Control checks:

  • Same stream with default/nonzero redirects: rejected with ERR_FR_MAX_BODY_LENGTH_EXCEEDED.
  • Buffered body with maxRedirects: 0: rejected with ERR_BAD_REQUEST.

Impact

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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmaxios1.0.0&&< 1.15.11.15.1
📦npmaxiosall versions0.31.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for axios. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update axios to 1.15.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5c9x-8gcm-mpgx is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-5c9x-8gcm-mpgx is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-5c9x-8gcm-mpgx. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary 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. ### Details Relevant flow in lib/adapters/http.js: - 556-564: maxBodyLength check applies only to buffered/non-stream data. - 681-682: maxRedirects === 0 selects native http/https transport. - 694-699: options.maxBodyLength is set, but native transport does not enforce it. - 925-945: stream is piped directly to socket (data.pipe(req)) with no Axios byte counting. Thi
O3 Security · Impact-Aware SCA

Is GHSA-5c9x-8gcm-mpgx in your dependencies?

O3 detects GHSA-5c9x-8gcm-mpgx across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.