CVE-2026-42039: Axios unbounded recursion denial of service in toFormData

CVE-2026-42039 · Severity: high · CVSS 7.5 · Published 2026-04-24

Axios is a widely used library for making web requests in Node.js and browser applications. A flaw in how it handles complex, nested data structures allows an attacker to send a specially crafted request that causes the application to crash. This can lead to a denial-of-service (DoS) condition, potentially taking down the entire server or specific application features.

Technologies: Axios, axios (npm). Vendors: Axios, npm.

Quick answers

Is CVE-2026-42039 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-42039 being exploited in the wild.
How severe is CVE-2026-42039?
High severity, with a CVSS score of 7.5, published 24 April 2026.
Which products and versions are affected?
Axios < 1.15.1, < 0.31.1, >= 1.0.0, < 1.15.1; axios (npm) SEMVER:introduced=1.0.0,fixed=1.15.1.
Is there a fix for CVE-2026-42039?
Yes. axios (npm): upgrade to 1.15.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-42039 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-42039?
Check whether you run Axios or axios (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • axios (npm): upgrade to 1.15.1 or later
    npm install axios@1.15.1

Technical details

The vulnerability exists in the 'toFormData' helper (specifically lib/helpers/toFormData.js), which is used to serialize request bodies and URL parameters. The 'build' function within this helper recursively traverses nested objects and arrays without a depth limit. An attacker can provide a deeply nested object (e.g., 2000+ levels deep) that exhausts the V8 engine's call stack, triggering a synchronous RangeError. In Node.js environments, this error can propagate and crash the request handler or the entire process. The issue is fixed in versions 1.15.1 and 0.31.1 by implementing recursion depth bounding.

Affected products

  • Axios Axios < 1.15.1, < 0.31.1

Identifiers

  • CVE-2026-42039
  • GHSA-62hf-57xw-28j9

Timeline

  • 2026-04-24: advisory: GitHub Security Advisory published
  • 2026-04-24: patched: Fixed in versions 1.15.1 and 0.31.1
  • 2026-04-24: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.