# CVE-2026-42042: Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercion

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-24T18:03:29.924Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-xx6v-rp6x-q39c
- Weaknesses: CWE-183, CWE-201
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- axios axios: >= 1.0.0, < 1.15.1; < 0.31.1; before 0.31.1; from 1.0.0 before 1.15.1
- axios (npm): from 1.0.0 before 1.15.1; before 0.31.1

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`

## References

- <https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c> (exploit, mitigation, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42042> (advisory)
- <https://github.com/axios/axios> (package)

## Sources

- CVE List: [CVE-2026-42042](https://www.cve.org/CVERecord?id=CVE-2026-42042), CVE Terms of Use, modified 2026-04-27
- GitHub Advisory Database: [GHSA-xx6v-rp6x-q39c](https://github.com/advisories/GHSA-xx6v-rp6x-q39c), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-42042](https://nvd.nist.gov/vuln/detail/CVE-2026-42042), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-42042 · Whole record: https://cve.day/CVE-2026-42042.json · Rebuilt by cve.day 2026-11-25T22:59:19.564Z
