axios 0.28.0 before 0.33.0 and 1.0.0 before 1.18.0 Denial of Service via formToJSON
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2026-67312
Publishedaxios versions from 0.28.0 before 0.33.0 and from 1.0.0 before 1.18.0 contain uncontrolled recursion in formDataToJSON (exposed as axios.formToJSON() and used internally when serializing FormData with Content-Type: application/json). When an application passes attacker-controlled FormData field names, a field name with thousands of nested bracket-delimited segments causes unbounded recursion in buildPath(), exhausting the JavaScript call stack (RangeError: Maximum call stack size exceeded) and causing denial of service for that request, or process termination in applications without appropriate error handling.
- Source published
- 1 Aug 2026 12:22:18 UTC
- Source modified
- 29 Oct 2026 21:16:30 UTC
- Observed here
- 29 Oct 2026 22:48:55 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · 6.3 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
euvd · EUVD-2026-51830
Publishedaxios versions from 0.28.0 before 0.33.0 and from 1.0.0 before 1.18.0 contain uncontrolled recursion in formDataToJSON (exposed as axios.formToJSON() and used internally when serializing FormData with Content-Type: application/json). When an application passes attacker-controlled FormData field names, a field name with thousands of nested bracket-delimited segments causes unbounded recursion in buildPath(), exhausting the JavaScript call stack (RangeError: Maximum call stack size exceeded) and causing denial of service for that request, or process termination in applications without appropriate error handling.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Aug 1, 2026, 12:22:18 PM
dateUpdated: Oct 29, 2026, 9:16:30 PM
10 related source bulletins · separate from aliases
RHSA-2026:48758: Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
CVE-2026-27459 · CVE-2026-62995 · CVE-2026-67312 · CVE-2026-67313 · CVE-2026-67314 · CVE-2026-67320 · CVE-2026-67321 · CVE-2026-73086
RHSA-2026:68754: Red Hat Security Advisory: Red Hat OpenShift Dev Spaces 3.30.1 Release.
CVE-2026-4800 · CVE-2026-45623 · CVE-2026-45819 · CVE-2026-47219 · CVE-2026-48801 · CVE-2026-54272 · CVE-2026-55831 · CVE-2026-55833 · CVE-2026-56745 · CVE-2026-56746 · CVE-2026-56819 · CVE-2026-59887 · CVE-2026-59899 · CVE-2026-67213 · CVE-2026-67312 · CVE-2026-67313 · CVE-2026-67314 · CVE-2026-67320 · CVE-2026-67321 · CVE-2026-69152 · CVE-2026-69153 · CVE-2026-69192 · CVE-2026-71436 · CVE-2026-73086 · CVE-2026-73088 · CVE-2026-73089 · CVE-2026-73508 · CVE-2026-73566 · CVE-2026-73646 · CVE-2026-75899 · CVE-2026-75931 · CVE-2026-75975 · CVE-2026-76172 · CVE-2026-82562 · CVE-2026-84292 · CVE-2026-84375 · CVE-2026-84394
openSUSE-SU-2026:11458-1: jupyter-nbdime-7.0.4-24.1 on GA media
CVE-2026-67312
RHSA-2026:62851: Red Hat Security Advisory: Red Hat Developer Hub 1.10.4 release.
CVE-2026-33818 · CVE-2026-41178 · CVE-2026-54272 · CVE-2026-56858 · CVE-2026-56859 · CVE-2026-56860 · CVE-2026-56862 · CVE-2026-67312 · CVE-2026-69152 · CVE-2026-69192
RHSA-2026:90321: Red Hat Security Advisory: Red Hat OpenShift Dev Spaces 3.31.0 Release.
CVE-2023-54404 · CVE-2025-62718 · CVE-2026-8643 · CVE-2026-9496 · CVE-2026-12185 · CVE-2026-13697 · CVE-2026-14682 · CVE-2026-15076 · CVE-2026-16308 · CVE-2026-17106 · CVE-2026-18427 · CVE-2026-19203 · CVE-2026-19534 · CVE-2026-39820 · CVE-2026-41178 · CVE-2026-41707 · CVE-2026-42499 · CVE-2026-42502 · CVE-2026-45416 · CVE-2026-47884 · CVE-2026-47886 · CVE-2026-47888 · CVE-2026-47890 · CVE-2026-47892 · CVE-2026-50010 · CVE-2026-55831 · CVE-2026-55833 · CVE-2026-55851 · CVE-2026-56745 · CVE-2026-56746 · CVE-2026-56819 · CVE-2026-56852 · CVE-2026-56854 · CVE-2026-58062 · CVE-2026-59280 · CVE-2026-59282 · CVE-2026-59283 · CVE-2026-59296 · CVE-2026-59313 · CVE-2026-59323 · CVE-2026-59651 · CVE-2026-59887 · CVE-2026-59899 · CVE-2026-59901 · CVE-2026-62243 · CVE-2026-64607 · CVE-2026-67213 · CVE-2026-67312 · CVE-2026-67313 · CVE-2026-67314 · CVE-2026-67320 · CVE-2026-67321 · CVE-2026-68494 · CVE-2026-68497 · CVE-2026-69152 · CVE-2026-69192 · CVE-2026-71290 · CVE-2026-71324 · CVE-2026-71325 · CVE-2026-71327 · CVE-2026-73500 · CVE-2026-73508 · CVE-2026-74835 · CVE-2026-75838 · CVE-2026-75899 · CVE-2026-75931 · CVE-2026-76169 · CVE-2026-81521 · CVE-2026-82417 · CVE-2026-82562 · CVE-2026-84292 · CVE-2026-84375 · CVE-2026-84394 · CVE-2026-84428 · CVE-2026-84445 · CVE-2026-84469 · CVE-2026-84504 · CVE-2026-84961 · CVE-2026-85062 · CVE-2026-85124 · CVE-2026-85152 · CVE-2026-85595 · CVE-2026-85597 · CVE-2026-86063 · CVE-2026-87743 · CVE-2026-88004 · CVE-2026-88007 · CVE-2026-88008 · CVE-2026-88009 · CVE-2026-88011 · CVE-2026-88012 · CVE-2026-88031 · CVE-2026-88878 · CVE-2026-88879 · CVE-2026-90711 · CVE-2026-93749 · CVE-2026-100655 · CVE-2026-100656 · CVE-2026-100666 · CVE-2026-101916 · CVE-2026-102925 · CVE-2026-102930 · CVE-2026-103435 · CVE-2026-109618 · CVE-2026-109619
RHSA-2026:48241: Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
CVE-2026-67213 · CVE-2026-67214 · CVE-2026-67312 · CVE-2026-67320 · CVE-2026-67321
RHSA-2026:87410: Red Hat Security Advisory: RHOAI 2.25.12 - Red Hat OpenShift AI
CVE-2024-12224 · CVE-2025-14920 · CVE-2025-14921 · CVE-2025-14924 · CVE-2025-14925 · CVE-2025-14926 · CVE-2025-14927 · CVE-2025-14928 · CVE-2025-14929 · CVE-2025-14930 · CVE-2025-61726 · CVE-2025-61729 · CVE-2026-5241 · CVE-2026-5497 · CVE-2026-6734 · CVE-2026-8643 · CVE-2026-9697 · CVE-2026-11822 · CVE-2026-11824 · CVE-2026-12151 · CVE-2026-12860 · CVE-2026-15143 · CVE-2026-15574 · CVE-2026-15679 · CVE-2026-15925 · CVE-2026-16221 · CVE-2026-18427 · CVE-2026-18446 · CVE-2026-18949 · CVE-2026-19481 · CVE-2026-19484 · CVE-2026-19534 · CVE-2026-25681 · CVE-2026-25960 · CVE-2026-27136 · CVE-2026-28390 · CVE-2026-28684 · CVE-2026-31812 · CVE-2026-32283 · CVE-2026-33186 · CVE-2026-33805 · CVE-2026-33811 · CVE-2026-33814 · CVE-2026-34993 · CVE-2026-39821 · CVE-2026-39852 · CVE-2026-39892 · CVE-2026-40682 · CVE-2026-41178 · CVE-2026-42502 · CVE-2026-42561 · CVE-2026-44431 · CVE-2026-44432 · CVE-2026-44660 · CVE-2026-44705 · CVE-2026-45820 · CVE-2026-47219 · CVE-2026-48526 · CVE-2026-48710 · CVE-2026-48746 · CVE-2026-49114 · CVE-2026-49825 · CVE-2026-49855 · CVE-2026-50559 · CVE-2026-54283 · CVE-2026-54399 · CVE-2026-54428 · CVE-2026-55831 · CVE-2026-55833 · CVE-2026-56121 · CVE-2026-56746 · CVE-2026-56819 · CVE-2026-56853 · CVE-2026-56858 · CVE-2026-56859 · CVE-2026-56860 · CVE-2026-56862 · CVE-2026-58059 · CVE-2026-59296 · CVE-2026-59879 · CVE-2026-59884 · CVE-2026-59885 · CVE-2026-59886 · CVE-2026-59899 · CVE-2026-62243 · CVE-2026-62384 · CVE-2026-63209 · CVE-2026-63374 · CVE-2026-65898 · CVE-2026-65918 · CVE-2026-66007 · CVE-2026-67213 · CVE-2026-67214 · CVE-2026-67312 · CVE-2026-68494 · CVE-2026-68497 · CVE-2026-68770 · CVE-2026-69097 · CVE-2026-69112 · CVE-2026-69152 · CVE-2026-69153 · CVE-2026-69243 · CVE-2026-69244 · CVE-2026-71281 · CVE-2026-73086 · CVE-2026-73088 · CVE-2026-73089 · CVE-2026-73415 · CVE-2026-73417 · CVE-2026-73502 · CVE-2026-73508 · CVE-2026-73620 · CVE-2026-73622 · CVE-2026-73623 · CVE-2026-73624 · CVE-2026-73625 · CVE-2026-73627 · CVE-2026-73646 · CVE-2026-75838 · CVE-2026-75899 · CVE-2026-75931 · CVE-2026-75975 · CVE-2026-76098 · CVE-2026-76169 · CVE-2026-76172 · CVE-2026-76222 · CVE-2026-76905 · CVE-2026-77354 · CVE-2026-77874 · CVE-2026-78676 · CVE-2026-78677 · CVE-2026-78679 · CVE-2026-78682 · CVE-2026-79674 · CVE-2026-79675 · CVE-2026-80205 · CVE-2026-81722 · CVE-2026-81724 · CVE-2026-81727 · CVE-2026-82397 · CVE-2026-82417 · CVE-2026-84292 · CVE-2026-84375 · CVE-2026-84394 · CVE-2026-84428 · CVE-2026-84445 · CVE-2026-84469 · CVE-2026-84504 · CVE-2026-84782 · CVE-2026-84961 · CVE-2026-85124 · CVE-2026-85152 · CVE-2026-85525 · CVE-2026-86049 · CVE-2026-86332 · CVE-2026-87776 · CVE-2026-87817 · CVE-2026-87819 · CVE-2026-88029 · CVE-2026-88031 · CVE-2026-89418 · CVE-2026-89425 · CVE-2026-91777 · CVE-2026-91990 · CVE-2026-92599 · CVE-2026-93599 · CVE-2026-93657 · CVE-2026-93749 · CVE-2026-96749 · CVE-2026-102831 · CVE-2026-102925 · CVE-2026-102930 · CVE-2026-102937 · CVE-2026-102938 · CVE-2026-103262 · CVE-2026-104851 · CVE-2026-105744
RHSA-2026:69248: Red Hat Security Advisory: Red Hat Developer Hub 1.9.9 release.
CVE-2026-19534 · CVE-2026-33818 · CVE-2026-54272 · CVE-2026-55553 · CVE-2026-56853 · CVE-2026-56858 · CVE-2026-56859 · CVE-2026-56860 · CVE-2026-56862 · CVE-2026-67214 · CVE-2026-67312 · CVE-2026-67422 · CVE-2026-69152 · CVE-2026-69192 · CVE-2026-73086 · CVE-2026-75899 · CVE-2026-75931 · CVE-2026-75975 · CVE-2026-76172 · CVE-2026-83605 · CVE-2026-83607 · CVE-2026-83608 · CVE-2026-83613 · CVE-2026-83614 · CVE-2026-83615 · CVE-2026-83616 · CVE-2026-83619 · CVE-2026-84292 · CVE-2026-84394 · CVE-2026-84961
RHSA-2026:47619: Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
CVE-2026-42127 · CVE-2026-56764 · CVE-2026-67213 · CVE-2026-67312 · CVE-2026-67320 · CVE-2026-67321
RHSA-2026:92510: Red Hat Security Advisory: RHOAI 3.4.6 - Red Hat OpenShift AI
CVE-2023-54404 · CVE-2026-11822 · CVE-2026-11824 · CVE-2026-13717 · CVE-2026-16221 · CVE-2026-17106 · CVE-2026-18446 · CVE-2026-25681 · CVE-2026-26007 · CVE-2026-27136 · CVE-2026-33814 · CVE-2026-33818 · CVE-2026-39821 · CVE-2026-39834 · CVE-2026-41178 · CVE-2026-42502 · CVE-2026-45819 · CVE-2026-45820 · CVE-2026-56853 · CVE-2026-56858 · CVE-2026-56859 · CVE-2026-56860 · CVE-2026-56862 · CVE-2026-57516 · CVE-2026-59951 · CVE-2026-63209 · CVE-2026-63374 · CVE-2026-65898 · CVE-2026-67312 · CVE-2026-67314 · CVE-2026-67320 · CVE-2026-67321 · CVE-2026-69097 · CVE-2026-69153 · CVE-2026-73086 · CVE-2026-73088 · CVE-2026-73089 · CVE-2026-73643 · CVE-2026-75838 · CVE-2026-75899 · CVE-2026-75931 · CVE-2026-75975 · CVE-2026-76172 · CVE-2026-76844 · CVE-2026-77301 · CVE-2026-78679 · CVE-2026-82397 · CVE-2026-83663 · CVE-2026-84375 · CVE-2026-84445 · CVE-2026-85393 · CVE-2026-85525 · CVE-2026-87018 · CVE-2026-90711 · CVE-2026-91990 · CVE-2026-92599 · CVE-2026-93690 · CVE-2026-93749 · CVE-2026-94637 · CVE-2026-96640 · CVE-2026-96643 · CVE-2026-96644 · CVE-2026-96778 · CVE-2026-96804 · CVE-2026-97687 · CVE-2026-97689 · CVE-2026-102267 · CVE-2026-102271 · CVE-2026-102272 · CVE-2026-102276 · CVE-2026-102278 · CVE-2026-102282 · CVE-2026-104150 · CVE-2026-104851 · CVE-2026-105922 · CVE-2026-106445 · CVE-2026-106446 · CVE-2026-109156 · CVE-2026-109383 · CVE-2026-109527 · CVE-2026-109829 · CVE-2026-109869 · CVE-2026-109956 · CVE-2026-110856 · CVE-2026-110857 · CVE-2026-110858 · CVE-2026-110859 · CVE-2026-111064 · CVE-2026-111066 · CVE-2026-111497 · CVE-2026-112390 · CVE-2026-112391 · CVE-2026-112392 · CVE-2026-112397 · CVE-2026-112399 · CVE-2026-112400 · CVE-2026-112402 · CVE-2026-112404 · CVE-2026-112405 · CVE-2026-112893 · CVE-2026-112894 · CVE-2026-112895 · CVE-2026-112896 · CVE-2026-112897 · CVE-2026-112940 · CVE-2026-114145
- Source published
- Aug 1, 2026, 12:22:18 PM (timezone not stated)
- Source modified
- Oct 29, 2026, 9:16:30 PM (timezone not stated)
- Observed here
- 5 Nov 2026 12:50:11 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 4.0 · 6.3 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
nvd · CVE-2026-67312
Publishedaxios versions from 0.28.0 before 0.33.0 and from 1.0.0 before 1.18.0 contain uncontrolled recursion in formDataToJSON (exposed as axios.formToJSON() and used internally when serializing FormData with Content-Type: application/json). When an application passes attacker-controlled FormData field names, a field name with thousands of nested bracket-delimited segments causes unbounded recursion in buildPath(), exhausting the JavaScript call stack (RangeError: Maximum call stack size exceeded) and causing denial of service for that request, or process termination in applications without appropriate error handling.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Analyzed
Weakness classifications: CWE-400
Original publisher date fields
published: 2026-08-01T13:17:01.150
lastModified: 2026-09-01T15:40:58.137
1 source CPE criteria · context only
- cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 1 Aug 2026 13:17:01 UTC
- Source modified
- 1 Sep 2026 15:40:58 UTC
- Observed here
- 25 Oct 2026 15:18:51 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · [email protected] · Secondary · 6.3 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1 · [email protected] · Primary · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
osv · GHSA-4ww2-rjh2-xpv9
Withdrawn## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-pmv8-rq9r-6j72. This link is maintained to preserve external references. ## Original Description axios versions from 0.28.0 before 0.33.0 and from 1.0.0 before 1.18.0 contain uncontrolled recursion in formDataToJSON (exposed as axios.formToJSON() and used internally when serializing FormData with Content-Type: application/json). When an application passes attacker-controlled FormData field names, a field name with thousands of nested bracket-delimited segments causes unbounded recursion in buildPath(), exhausting the JavaScript call stack (RangeError: Maximum call stack size exceeded) and causing denial of service for that request, or process termination in applications without appropriate error handling.
- Source published
- 1 Aug 2026 15:30:27 UTC
- Source modified
- 10 Sep 2026 03:50:53 UTC
- Observed here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V4 · 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Publisher rating · MODERATE
osv · GHSA-pmv8-rq9r-6j72
Published## Summary Axios versions starting with `0.28.0` contain uncontrolled recursion in `formDataToJSON`, which is exposed as `axios.formToJSON()` and used internally when axios serialises `FormData` with `Content-Type: application/json`. If an application passes attacker-controlled `FormData` field names to this functionality, a field name with thousands of nested bracket segments can exhaust the JavaScript call stack and cause denial of service for that request or, in applications without appropriate error handling, process termination. ## Impact Applications are affected only when untrusted users can control `FormData` key names that are converted through axios. Affected paths include direct use of `axios.formToJSON()` on untrusted `FormData` and axios requests in which attacker-controlled `FormData` is sent with `Content-Type: application/json`. The observed failure is `RangeError: Maximum call stack size exceeded`. In local testing, this error is catchable, so process-wide crash depends on the consuming application's error handling and runtime behaviour. ## Affected Functionality Affected functionality: - `axios.formToJSON(formData)` - Named ESM export `formToJSON` - Default `transformRequest` behaviour for `FormData` when `Content-Type` contains `application/json` Unaffected functionality: - Normal multipart `FormData` submission without JSON serialisation - `toFormData`, which already enforces a `maxDepth` guard - Axios versions `<=0.27.2`, where `formDataToJSON` was not present ## Technical Details The vulnerable code is in `lib/helpers/formDataToJSON.js`. `parsePropPath()` splits a field name such as `a[x][x][x]` into path segments. `buildPath()` then recursively processes one segment per call without enforcing a maximum depth: ```js const result = buildPath(path, value, target[name], index); ``` A key with thousands of bracket-delimited segments causes thousands of recursive calls and can exceed the JavaScript engine's call stack limit. Relevant source locations: - `lib/helpers/formDataToJSON.js` contains the unbounded recursive `buildPath()`. - `lib/axios.js` exposes the helper as `axios.formToJSON`. - `index.js` exposes `formToJSON` as a named export. - `index.d.ts` and `index.d.cts` declare the public API. - `lib/defaults/index.js` calls `formDataToJSON(data)` when JSON-serializing `FormData`. The inverse helper, `toFormData`, already enforces `maxDepth` and throws `AxiosError` with `ERR_FORM_DATA_DEPTH_EXCEEDED`, but `formDataToJSON` does not have an equivalent guard. ## Proof of Concept of Attack ```js import axios from 'axios'; const fd = new FormData(); fd.append('a' + '[x]'.repeat(15000), 'value'); try { axios.formToJSON(fd); console.log('not vulnerable'); } catch (e) { console.log(`${e.constructor.name}: ${e.message}`); } ``` Expected result on affected versions: RangeError: Maximum call stack size exceeded The same condition can be reached via an axios request transformation when attacker-controlled `FormData` is sent with `Content-Type: application/json`. ## Workarounds Applications can reject or normalise untrusted form field names before calling `axios.formToJSON()`. Applications can avoid sending untrusted `FormData` through axios as JSON unless JSON conversion is required. Applications should catch errors around `formToJSON()` or axios requests that transform untrusted `FormData`. <details> <summary>Original Source</summary> ### Summary An uncontrolled recursion vulnerability in `formDataToJSON` allows any user who controls FormData input to crash a Node.js process with a single request. The function recurses once per bracket-delimited segment in a FormData key name with no depth limit, so a key like `a[x][x][x]...` with 15,000+ segments exhausts the call stack. This is a denial-of-service that kills the process via an unrecoverable `RangeError`. The inverse function `toFormData` already enforces a `maxDepth` limit (default 100) for exactly this reason — `formDataToJSON` lacks the equivalent guard. ### Details **Vulnerable function:** `buildPath` in `lib/helpers/formDataToJSON.js`, lines 50–82. `buildPath(path, value, target, index)` is called recursively — once per segment in the parsed property path — with no depth check: ```javascript // lib/helpers/formDataToJSON.js, lines 50–82 function buildPath(path, value, target, index) { let name = path[index++]; // advance one level if (name === '__proto__') return true; // ... if (!isLast) { // ... const result = buildPath(path, value, target[name], index); // recurse — NO depth guard // ... } } ``` The key is first split into segments by `parsePropPath` (line 17), which extracts every `[segment]` via regex. A key with 15,000 bracket pairs produces a 15,001-element array, causing 15,001 recursive calls — well beyond the V8 default stack limit (~10,000–15,000 frames). **`formDataToJSON` is a public API** consumed two ways: 1. **Directly by consumers** — exported as `axios.formToJSON()` (`lib/axios.js:80`), with TypeScript declarations in both `index.d.ts:699` and `index.d.cts:708`, and documented in the API reference in four languages (`docs/pages/advanced/api-reference.md`). 2. **Internally by `transformRequest`** — called at `lib/defaults/index.js:56` when the request body is `FormData` and `Content-Type` contains `application/json`: ```javascript return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; ``` **Contrast with `toFormData`:** The inverse function (`lib/helpers/toFormData.js:118`) enforces `maxDepth` (default 100) and throws `AxiosError` with code `ERR_FORM_DATA_DEPTH_EXCEEDED` when exceeded. `formDataToJSON` has no equivalent protection. ### PoC Requires only Node.js and an unmodified axios v1.x install: ```javascript import formDataToJSON from 'axios/lib/helpers/formDataToJSON.js'; // Build a FormData with a single key containing 15,000 nested bracket segments const fd = new FormData(); const key = "a" + "[x]".repeat(15000); fd.append(key, "value"); try { formDataToJSON(fd); console.log("Not vulnerable"); } catch (e) { console.log(e.constructor.name + ": " + e.message); // RangeError: Maximum call stack size exceeded } ``` Verified output on Node.js 22.22.3 against axios v1.16.1 (current `v1.x` HEAD): ``` RangeError: Maximum call stack size exceeded ``` The process crashes. In a server context (e.g., Express middleware calling `axios.formToJSON()` on an uploaded form), a single crafted request terminates the process. ### Impact **Denial of Service (process crash).** Any unauthenticated user who can submit FormData to a Node.js application that passes it through `axios.formToJSON()` — or that sends it as a JSON-serialized FormData body via axios — can crash the server process with a single request. The `RangeError` from stack exhaustion is unrecoverable in many contexts (it cannot be reliably caught when the stack is already full). No authentication or special privileges are required; the attacker only needs to control a FormData key name. </details>
- Source published
- 20 Jul 2026 17:48:18 UTC
- Source modified
- 10 Sep 2026 03:51:11 UTC
- Observed here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V4 · 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
Publisher rating · MODERATE