Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Axios: Deep formToJSON Key Recursion Can Cause Denial of Service

0
Medium
Published: 07/20/2026 (07/20/2026, 17:48:18 UTC)
Source: GCVE Database
Product: axios

Description

Axios versions starting from 0.28.0 up to but not including 0.33.0, and versions from 1.0.0 up to but not including 1.18.0, contain an uncontrolled recursion vulnerability in the formDataToJSON function. This vulnerability occurs when attacker-controlled FormData key names with thousands of nested bracket segments cause excessive recursive calls, leading to a JavaScript call stack overflow and denial of service. The issue manifests as a RangeError that can crash the process if not properly handled. Normal multipart FormData submissions and axios versions prior to 0.28.0 are not affected.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected software

npmghsa
axios
Affected versions
>=0.28.0 <0.33.0
npmghsa
axios
Affected versions
>=1.0.0 <1.18.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/20/2026, 19:49:27 UTC

Technical Analysis

The vulnerability exists in the axios library's formDataToJSON function, exposed as axios.formToJSON and used internally when serializing FormData with Content-Type: application/json. The function recursively processes bracket-delimited segments of FormData key names without enforcing a maximum recursion depth, allowing an attacker to craft keys with thousands of nested segments (e.g., 'a[x][x][x]...') that exhaust the JavaScript call stack. This leads to a RangeError: Maximum call stack size exceeded, causing denial of service by crashing the Node.js process or failing the request. The inverse function toFormData enforces a maxDepth guard, but formDataToJSON lacks this protection. The vulnerability affects axios versions >=0.28.0 <0.33.0 and >=1.0.0 <1.18.0. Exploitation requires attacker control over FormData key names that are JSON serialized by axios.

Potential Impact

Applications using affected axios versions that accept untrusted FormData key names and serialize them to JSON are vulnerable to denial of service via call stack exhaustion. The impact is a RangeError causing request failure or process termination depending on error handling. This can disrupt service availability but does not directly lead to code execution or data breach. The vulnerability is limited to scenarios where attacker-controlled FormData keys are processed through axios.formToJSON or axios requests with Content-Type: application/json and FormData payloads.

Mitigation Recommendations

No official patch information is provided in the source data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. In the meantime, applications should reject or normalize untrusted FormData key names before passing them to axios.formToJSON. Avoid sending untrusted FormData through axios as JSON unless necessary. Implement error handling to catch exceptions from formToJSON or axios requests that transform untrusted FormData to prevent process crashes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-pmv8-rq9r-6j72
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
MODERATE
Cvss Version
4.0

Threat ID: 6a5e79ef2a4a8d59899bc269

Added to database: 07/20/2026, 19:41:35 UTC

Last enriched: 07/20/2026, 19:49:27 UTC

Last updated: 07/21/2026, 05:05:48 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses