CVE-2026-42042

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

MEDIUM
5.4
CVSS Score
Published: April 24, 2026 at 06:03 PM UTC
Updated: June 17, 2026 at 10:47 AM UTC
1 product affected across 1 vendorAxios

Using axios by axios?

Get instant alerts when new vulnerabilities affect axios - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.4
Exploit prediction
EPSS 0.2%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.31.1v < 1.15.11.0.0 ≤ v < 1.15.1
Affected range stops below 0.31.1, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.15.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (1)

x_refsource_CONFIRMExploitMitigationVendor Advisory
Source: cverecord
https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.4MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-183CWE-201

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card