CVE-2026-42042
Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercion
No known exploitation. EPSS puts it in the 24th percentile. Fixed in 0.31.1.
What to do
Find your product and version, then upgrade to the build on the right.
- AxiosAffected: < 0.31.1Upgrade to: 0.31.1Stated by: NVD
Versions as the sources state them. Full version matrix after sign-in
Steps
Written by AI from the record- Check whether your web application uses Axios before 1.15.1 or 0.31.1.
- Upgrade Axios to 1.15.1 on the 1.x branch, or 0.31.1 on the 0.x branch.
- Until upgraded, ensure
withXSRFTokenis set only totrueorfalseand investigate any prototype-pollution issues.
npm install axios@1.15.1What it is
From the CVE record
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.
In plain language
Written by AI from the recordAxios versions before 1.15.1 or 0.31.1 can accidentally send a website’s security token to another site; most small businesses should update if they use Axios in a web application.
Axios has a cross-origin XSRF-token disclosure flaw caused by truthy non-boolean coercion of `withXSRFToken`, allowing prototype pollution or misconfiguration to bypass `isURLSameOrigin`.
If you're affected
- Security token disclosure
- Unauthorized request risk
- Customer account risk
- Application trust loss
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
0.3% chance of exploitation activity in the next 30 days, which ranks it in the 24th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
5 events over 146 days, from the signal feeds we watch.
- OpenVAS check added
- Workaround availablerecord updated
- Publishedweakness classified
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Scored 5.4 by NVD.
How it is reached
- Attack Vector NetworkExploitable remotely over the network without any special conditions
- Attack Complexity LowNo special conditions — the attack can be reliably reproduced
- Privileges Required NoneNo authentication required — anyone can exploit this
- User Interaction RequiredA user must click a link, open a file, or perform some action
Scope
- Scope UnchangedImpact is limited to the vulnerable component itself
Impact if exploited
- Confidentiality LowSome restricted information is disclosed, but limited in scope
- Integrity LowData modification is possible but limited in scope or consequence
- Availability NoneNo availability impact
Weaknesses
Sources
References in the record
Watch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Axios, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI