CVE-2026-42042 in Axios
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 (v...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, requires user interaction, impact contained to the vulnerable component, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Axios | Axios | < 0.31.1 ≥ 1.0.0, < 1.15.1 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-42042 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-152677-M |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| Published | 2026-04-24 |
| Last modified | 2026-11-11 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-183: CWE-183
CWE-201: CWE-201
Related attack patterns (CAPEC)
CAPEC-3 Using Leading 'Ghost' Character Sequences to Bypass Input Filters via CWE-183
CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-183
CAPEC-71 Using Unicode Encoding to Bypass Validation Logic via CWE-183
CAPEC-120 Double Encoding via CWE-183
CAPEC-612 WiFi MAC Address Tracking via CWE-201
Show all 13
CAPEC-613 WiFi SSID Tracking via CWE-201
CAPEC-618 Cellular Broadcast Message Request via CWE-201
CAPEC-619 Signal Strength Tracking via CWE-201
CAPEC-621 Analysis of Packet Timing and Sizes via CWE-201
CAPEC-622 Electromagnetic Side-Channel Attack via CWE-201
CAPEC-623 Compromising Emanations Attack via CWE-201
CAPEC-12 Choosing Message Identifier via CWE-201
CAPEC-217 Exploiting Incorrectly Configured SSL/TLS via CWE-201
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2026-42042 affects Axios versions prior to 1.15.1 and 0.31.1, where the XSRF token protection logic is vulnerable to misconfiguration or prototype pollution, potentially bypassing the same-origin policy.
An attacker could exploit this vulnerability by setting the withXSRFToken configuration property to a truthy non-boolean value, which would incorrectly enable XSRF token protection logic, potentially leading to a bypass of the same-origin policy and allowing cross-site request forgery (CSRF) attacks.
Questions
What is CVE-2026-42042?
CVE-2026-42042 affects Axios versions prior to 1.15.1 and 0.31.1, where the XSRF token protection logic is vulnerable to misconfiguration or prototype pollution, potentially bypassing the same-origin policy.
What is the CVSS score for CVE-2026-42042?
CVE-2026-42042 has CVSS 5.4 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N. EPSS: 0.3%.
Is CVE-2026-42042 actively exploited?
No confirmed active exploitation of CVE-2026-42042 as of 2026-11-12.
How do I remediate CVE-2026-42042?
Priority: HIGH. PSIRT: [email protected]
What systems are affected by CVE-2026-42042?
CVE-2026-42042 affects Axios Axios.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Axios","product":"Axios","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-11-11.