CVE-2024-57965 Details
Description
In axios before 1.7.8, lib/helpers/isURLSameOrigin.js does not use a URL object when determining an origin, and has a potentially unwanted setAttribute('href',href) call. NOTE: some parties feel that the code change only addresses a warning message from a SAST tool and does not fix a vulnerability.
A cross-site scripting (XSS) vulnerability has been identified in Axios versions prior to 1.7.8. The issue arises in the 'lib/helpers/isURLSameOrigin.js' file, where the library improperly uses a DOM method to determine URL origins. This flaw allows unvalidated data to be set as HTML attributes, potentially leading to XSS attacks by executing malicious scripts or code in the user's browser.
Users can upgrade to Axios version 1.7.8 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 29, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/axios/axios/commit/0a8d6e19da5b9899a2abafaaa06a75ee548597db | [email protected] | Patch |
| https://github.com/axios/axios/issues/6351 | [email protected] | Issue Tracking |
| https://github.com/axios/axios/pull/6714 | [email protected] | Issue TrackingPatch |
| https://github.com/axios/axios/releases/tag/v1.7.8 | [email protected] | Release Notes |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-346 | Origin Validation Error | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| axios axios | < 1.7.8 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Sep 19, 2025 | Initial Analysis | [email protected] |
| Jan 29, 2025 | CVE Modified | [email protected] |
| Jan 29, 2025 | New CVE Received | [email protected] |