Skip to main content
CVE-2026-42042VulnerabilityPublished

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

Affects axiosSource GCVE Database

0

Not known to be exploited · CVSS 5.4 Medium : upgrade to 1.15.1 when convenient.

Data as of 27 Oct 2026, 01:30 UTC

CVSS 3.1 base score
5.4Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.15.1, 0.31.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 5 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade axios to 1.15.1; axios to 0.31.1.

Affected software

ProductAffectedFixed in
npmaxiosAffected
  • >=1.0.0 <1.15.1
Fixed in
  • 1.15.1
npmaxiosAffected
  • <0.31.1
Fixed in
  • 0.31.1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in Axios versions 1.15.1 and 0.31.1 that corrects the boolean coercion logic for the `withXSRFToken` property. Users should upgrade to these fixed versions to remediate the vulnerability. No additional mitigations are required if the patch is applied. If upgrading is not immediately possible, ensure that prototype pollution vulnerabilities are mitigated in dependencies and avoid misconfiguring `withXSRFToken` with non-boolean truthy values.

Description

Axios contains a vulnerability in its XSRF token protection logic where the `withXSRFToken` configuration property is coerced using JavaScript truthy/falsy semantics rather than strict boolean checks. This flaw allows prototype pollution or misconfiguration to cause the same-origin check to be bypassed, resulting in XSRF tokens being sent to cross-origin servers, potentially controlled by attackers. The vulnerability affects all Axios versions from 1.0.0 up to but not including 1.15.1, and all versions before 0.31.1. It is limited to browser environments and enables theft of anti-CSRF tokens, which can facilitate CSRF attacks but does not directly compromise session tokens. A fix is available in versions 1.15.1 and 0.31.1.

References

Community reviews

Loading reviews…