CVE-2026-42042
CVE-2026-42042 · Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercion
This page contains facts from public vulnerability sources. Check the original advisory before updating.
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, the Axios library's XSRF token protection logic uses JavaScript truthy/falsy semantics instead of strict boolean comparison for the withXSRFToken config property. When this property is set to any truthy non-boolean value (via prototype pollution or misconfiguration), the same-origin check (isURLSameOrigin) is short-circuited, causing XSRF tokens to be sent to all request targets including cross-origin servers controlled by an attacker. This vulnerability is fixed in 1.15.1 and 0.31.1.
CVSS 5.4 · Medium · EPSS 0.3% · Fix available
- Published
- Updated
Affected products and versions
axios
- Versions
- >= 1.0.0, < 1.15.1: Affected
- < 0.31.1: Affected
No fix published
node-axios Debian:12
- Versions
- 1.11.0+dfsg-1
- 1.12.1+dfsg-1
- 1.13.1+dfsg-1
- 1.13.2+dfsg-1
- 1.14.0+dfsg-1
- 1.15.0-1
- 1.15.2-1
- 1.16.0-1
- 1.18.0-1
- 1.19.0-1
- 1.2.1+dfsg-1
- 1.2.1+dfsg-1+deb12u1
- 1.20.0-1
- 1.5.1+dfsg-1
- 1.6.2+dfsg-1
- 1.6.8+dfsg-1
- 1.6.8+dfsg-2
- 1.7.3+dfsg-1
- 1.7.4+dfsg-1
- 1.7.7+dfsg-1
- 1.7.9+dfsg-1
- 1.8.4+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Debian:13
- Versions
- 1.11.0+dfsg-1
- 1.12.1+dfsg-1
- 1.13.1+dfsg-1
- 1.13.2+dfsg-1
- 1.14.0+dfsg-1
- 1.15.0-1
- 1.15.2-1
- 1.16.0-1
- 1.18.0-1
- 1.19.0-1
- 1.20.0-1
- 1.8.4+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Debian:14
- Versions
- 1.11.0+dfsg-1
- 1.12.1+dfsg-1
- 1.13.1+dfsg-1
- 1.13.2+dfsg-1
- 1.14.0+dfsg-1
- 1.15.0-1
- 1.8.4+dfsg-1
- Affected ranges
- ECOSYSTEM: < 1.15.2-1
Update to 1.15.2-1
axios npm
- Affected ranges
- SEMVER: ≥ 1.0.0, < 1.15.1
Update to 1.15.1
axios npm
- Affected ranges
- SEMVER: < 0.31.1
Update to 0.31.1
node-axios Ubuntu:Pro:20.04:LTS
- Versions
- 0.19.0+dfsg-2
- 0.19.0+dfsg-2ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Ubuntu:Pro:22.04:LTS
- Versions
- 0.21.1+dfsg-1
- 0.23.0+dfsg-2
- 0.24.0+dfsg-1
- 0.25.0+dfsg-2
- 0.26.0+dfsg-1
- 0.26.0+dfsg-1ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Ubuntu:Pro:24.04:LTS
- Versions
- 1.2.1+dfsg-1
- 1.5.1+dfsg-1
- 1.6.2+dfsg-1
- 1.6.8+dfsg-2
- 1.6.8+dfsg-2ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Ubuntu:25.10
- Versions
- 1.7.9+dfsg-1
- 1.8.4+dfsg-1
- 1.11.0+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Ubuntu:26.10
- Versions
- 1.13.2+dfsg-1build1
- 1.16.0-1
- 1.18.0-1
- 1.19.0-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-axios Ubuntu:Pro:26.04:LTS
- Versions
- 1.11.0+dfsg-1
- 1.12.1+dfsg-1
- 1.13.2+dfsg-1build1
- 1.13.2+dfsg-1ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published