{"id":"CVE-2026-42042","state":"PUBLISHED","title":"Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercion","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.","publishedAt":"2026-04-24T18:03:29.924Z","updatedAt":"2026-04-27T17:35:41.883Z","severity":{"score":5.4,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["axios axios"],"affected":[{"vendor":"axios","product":"axios","versions":[{"version":">= 1.0.0, < 1.15.1","status":"affected"},{"version":"< 0.31.1","status":"affected"}]}],"references":["https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c"],"weaknesses":["CWE-183","CWE-201"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/42xxx/CVE-2026-42042.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-42042","state":"PUBLISHED","datePublished":"2026-04-24T18:03:29.924Z","dateUpdated":"2026-04-27T17:35:41.883Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-04-23T16:05:01.709Z"},"containers":{"cna":{"title":"Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercion","descriptions":[{"lang":"en","value":"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":[{"vendor":"axios","product":"axios","versions":[{"version":">= 1.0.0, < 1.15.1","status":"affected"},{"version":"< 0.31.1","status":"affected"}]}],"references":[{"url":"https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c","name":"https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.4,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-183","lang":"en","description":"CWE-183: Permissive List of Allowed Inputs","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-201","lang":"en","description":"CWE-201: Insertion of Sensitive Information Into Sent Data","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-04-24T18:03:29.924Z"},"source":{"advisory":"GHSA-xx6v-rp6x-q39c","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/axios/axios/security/advisories/GHSA-xx6v-rp6x-q39c","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-27T17:35:32.406605Z","id":"CVE-2026-42042","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-27T17:35:41.883Z"}}]}}}