CVE-2026-42042
Description
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.
Description as published by the source, in English.
Key facts
- Published
- 2026-04-24
- Last modified
- 2026-11-11
- Assigned by
- security-advisories@github.com
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N- Scored by
- security-advisories@github.com
- Probability of exploitation
-
0.2 %
higher than 14 %
of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Not registered in the sources
Affected products
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Axios | Axios | < 0.31.1 | Affected |
| Axios | Axios | ≥ 1.0.0, < 1.15.1 | Affected |
Weakness type
-
CWE-183: Permissive List of Allowed Inputs
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - t…
-
CWE-201: Insertion of Sensitive Information Into Sent Data
The code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor.
References
- https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c
- https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c
Related at Berigo
Articles
-
OpenAI rotates signing certificate after the Axios compromise
Same product
2026-04-10
The certificate used to sign OpenAI's macOS applications sat in a build pipeline that used Axios, and is being replaced as a precaution.
-
Supply chain attack on axios hit one of npm's most used libraries
Same product
2026-03-31
Two malicious versions were published using the maintainer's compromised account and dropped a remote access trojan on macOS, Windows and Linux.
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.