Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. axios
  4. ›
  5. GHSA-42h9-826w-cgv3

GHSA-42h9-826w-cgv3: Axios: Excessive recursion in formDataToJSON can cause denial of service

July 20, 2026

Axios versions 0.28.0 and later contain uncontrolled recursion in formDataToJSON, the helper behind the public axios.formToJSON() / named formToJSON API and the default request transform used when FormData is sent with an application/json content type.

Applications are affected when they pass attacker-controlled FormData field names into this functionality. A field name with thousands of nested bracket segments can exhaust the JavaScript call stack and throw RangeError: Maximum call stack size exceeded, causing request failure and, in applications that do not handle the exception or rejected promise, possible process termination.

The shouldBypassProxy() function in Axios fails to recognise 0.0.0.0, ::, and ::ffff:0.0.0.0 as loopback addresses. When NO_PROXY=localhost is configured, requests to these addresses are incorrectly forwarded through the proxy instead of being sent directly, enabling an SSRF attack against internal services reachable via the proxy’s loopback interface.

References

  • github.com/advisories/GHSA-42h9-826w-cgv3
  • github.com/axios/axios/commit/1417285c69344bbcc6420a021f67dee0c6fedb2d
  • github.com/axios/axios/commit/32fc489632377d214db55bfa4e2c48486a7d7ce2
  • github.com/axios/axios/pull/11000
  • github.com/axios/axios/pull/11001
  • github.com/axios/axios/releases/tag/v0.33.0
  • github.com/axios/axios/releases/tag/v1.18.0
  • github.com/axios/axios/security/advisories/GHSA-42h9-826w-cgv3

Code Behaviors & Features

Detect and mitigate GHSA-42h9-826w-cgv3 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.28.0 before 0.33.0, all versions starting from 1.0.0 before 1.18.0

Fixed versions

  • 0.33.0
  • 1.18.0

Solution

Upgrade to versions 0.33.0, 1.18.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-674: Uncontrolled Recursion

Source file

npm/axios/GHSA-42h9-826w-cgv3.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:23 +0000.