mediumVulnerability

GHSA-hcpx-6fm6-wx23

## Summary Axios versions in the fixed lines for GHSA-62hf-57xw-28j9 still contain an incomplete depth-limit bypass in `lib/helpers/toFormData.js`. When serializing an object with a top-level key ending in `{}`, axios calls `JSON.stringify()` on that value before the `formSerializer.maxDepth` guard can inspect the nested structure. An attacker who can control object keys and nested values passed by an application into axios form or parameter serialization can trigger a raw `RangeError: Maximum call stack size exceeded`, causing a denial of service in the affected request path. ## Impact The impact is availability only. No confidentiality or integrity impact was confirmed. Server-side applications are the primary concern when they accept user-controlled input and pass it into axios as `data` or `params` for `multipart/form-data`, `application/x-www-form-urlencoded`, or default parameter serialization. Browser impact is limited to the page or request context unless the application builds a broader failure mode around the thrown exception. The attack requires control over a top-level object key ending in `{}` and a deeply nested object value. The option `formSerializer.metaTokens: false` is not a workaround because it only changes the emitted key name; the value is still stringified. ## Affected Functionality Affected paths include: - `lib/helpers/toFormData.js` when a top-level key ends with `{}`. - `lib/helpers/toURLEncodedForm.js`, which delegates to `helpers.defaultVisitor`. - `lib/helpers/AxiosURLSearchParams.js`, used by default params serialization. - Request transforms in `lib/defaults/index.js` when object data is serialized as `multipart/form-data` or `application/x-www-form-urlencoded`. Unaffected paths include: - Already-created `FormData` or `URLSearchParams` values that axios does not walk with `toFormData`. - Custom `paramsSerializer.serialize` implementations that do not call axios `toFormData`. - Non-`{}` deeply nested values in `toFormData`

Properties

ghsa_id
GHSA-hcpx-6fm6-wx23
severity
medium
summary
Axios form serializer maxDepth bypass via {} metatoken
cve_id
GHSA-hcpx-6fm6-wx23
is_ghsa_only
true
ghsa_published
2026-07-20T22:38:04Z
source_url
https://github.com/advisories/GHSA-hcpx-6fm6-wx23
ghsa_updated
2026-07-20T22:38:04Z

Related Entities (4)

VULNERABLE_TO (1)

[Software]npm/axios

AFFECTS (1)

[Software]npm/axios

HAS_WEAKNESS (1)

[Weakness]Uncontrolled Recursion

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-hcpx-6fm6-wx23 — Ninja Signal Threat Intelligence | Ninja Signal