{"id":"CVE-2026-42042","published":"2026-04-24T18:03:29Z","modified":"2026-04-27T17:35:41Z","title":"Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercion","vendor":"axios","product":"axios","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00337,"percentile":0.19569,"provenance":"source"},"cwes":[{"id":"CWE-183","name":"Permissive List of Allowed Inputs"},{"id":"CWE-201","name":"Insertion of Sensitive Information Into Sent Data"}],"references":[{"url":"https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c","tags":["x_refsource_CONFIRM"]}],"priority":{"score":7.7,"factors":[{"name":"EPSS percentile","points":3.91},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"axios","affectedVersions":[{"vendor":"axios","product":"axios","versions":[">= 1.0.0, < 1.15.1","< 0.31.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-27T17:35:32.406605Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"axios","vulnerableRanges":[">=1.0.0, <1.15.1","<0.31.1"],"patched":["1.15.1","0.31.1"],"from":["GHSA-xx6v-rp6x-q39c"],"provenance":"source"}],"summary":{"text":"Axios, a promise-based HTTP client for browsers and Node.js, has a flaw in its XSRF protection logic where the withXSRFToken config property is checked using truthy/falsy semantics rather than strict boolean comparison. An attacker who can set that property to a truthy non-boolean value (through prototype pollution or misconfiguration) can cause the same-origin check to be bypassed, leaking XSRF tokens to cross-origin request targets, and exploitation requires user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:18:19Z"},"euvd":{"id":"EUVD-2026-25607","exploited":false,"provenance":"source"}}