CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-hcpx-6fm6-wx23: Axios form serializer maxDepth bypass via {} metatoken

medium
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, which hit ERR_FORM_DATA_DEPTH_EXCEEDED as intended. Techni

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
medium
Published
2026-07-20
Last updated
2026-07-20
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-hcpx-6fm6-wx23

More from GitHub Security Advisories