CVE-2026-67313: Axios · Excessive recursion in formDataToJSON can cause denial of service
Affects axiosSource GCVE Database
Mentioned vulnerabilities
CVSS 6.3 Medium : upgrade to 1.18.0 when convenient.
Data as of 26 Oct 2026, 16:07 UTC
- Patch
- Available – fixed in 1.18.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NWhat to do
Upgrade axios to 1.18.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmaxios | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Applications should avoid converting attacker-controlled FormData to JSON using axios.formToJSON() or by sending FormData with Content-Type application/json. Validate and reject FormData field names with excessive nesting depth before conversion or sending. Avoid setting Content-Type to application/json for untrusted FormData to bypass the vulnerable code path. Catching the RangeError can prevent process termination but does not fix the underlying recursion issue and should not be relied on as the primary mitigation.
Description
Axios versions 0.28.0 and later contain a vulnerability in the formDataToJSON helper function that causes uncontrolled recursion when processing FormData field names with deeply nested bracket segments. This can lead to a denial of service by exhausting the JavaScript call stack and throwing a RangeError. The issue affects applications that convert attacker-controlled FormData to JSON, particularly when using axios.formToJSON() or sending FormData with Content-Type application/json. Normal multipart FormData requests without JSON serialization are not affected. The vulnerability can cause request failures and potentially process termination if exceptions are not handled.
References
- github.com/axios/axios/security/advisories/GHSA-42h9-826w-cgv3 (opens in a new tab)
- github.com/axios/axios/pull/11000 (opens in a new tab)
- github.com/axios/axios/pull/11001 (opens in a new tab)
- github.com/axios/axios/commit/1417285c69344bbcc6420a021f67dee0c6fedb2d (opens in a new tab)
- github.com/axios/axios/commit/32fc489632377d214db55bfa4e2c48486a7d7ce2 (opens in a new tab)
- github.com/axios/axios (opens in a new tab)
- github.com/axios/axios/releases/tag/v0.33.0 (opens in a new tab)
- github.com/axios/axios/releases/tag/v1.18.0 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-67313 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-68942 (opens in a new tab)
- vulncheck.com/advisories/axios-before-denial-of-service-via-formdatatojson (opens in a new tab)