Axios 1.15.1/0.31.1 CRASH via toFormData deep nesting
CVE-2026-42039 Published on April 24, 2026
Axios: unbounded recursion in toFormData causes DoS via deeply nested request data
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, toFormData recursively walks nested objects with no depth limit, so a deeply nested value passed as request data crashes the Node.js process with a RangeError. This vulnerability is fixed in 1.15.1 and 0.31.1.
Weakness Type
What is a Stack Exhaustion Vulnerability?
The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack.
CVE-2026-42039 has been classified to as a Stack Exhaustion vulnerability or weakness.
Products Associated with CVE-2026-42039
Want to know whenever a new CVE is published for Axios? stack.watch will email you.
Affected Versions
axios:- Version >= 1.0.0, < 1.15.1 is affected.
- Version < 0.31.1 is affected.