CVE-2024-39338
JavaScript vulnerability analysis and mitigation

Overview

Axios versions 1.3.2 through 1.7.3 contain a Server-Side Request Forgery (SSRF) vulnerability identified as CVE-2024-39338. The vulnerability exists due to unexpected behavior where requests for path relative URLs get processed as protocol relative URLs, potentially allowing attackers to perform arbitrary requests from the server (Jeff Advisory, NVD).

Technical details

The vulnerability was introduced in version 1.3.2 when Axios added 'http://localhost' as a base URL for relative paths. The issue occurs in the URL parsing logic where protocol-relative URLs are considered absolute, causing the config.baseURL value to be ignored. When a protocol-relative URL is passed to the URL class without a protocol, the Node.js URL class prepends the protocol from 'http://localhost' to the protocol-relative URL. The vulnerability has received a CVSS v3.1 base score of 7.5 (HIGH) from NIST (NVD).

Impact

This vulnerability could allow attackers to perform arbitrary requests from the server, potentially accessing internal systems or exfiltrating sensitive data. The issue affects server-side implementations where attackers could craft malicious protocol-relative URLs to bypass intended URL restrictions (Jeff Advisory).

Mitigation and workarounds

The vulnerability has been fixed in Axios version 1.7.4. Users are strongly recommended to upgrade to this version or later to address the SSRF vulnerability. The fix involves changes to how protocol-relative URLs are handled in the server-side context (Axios Release).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management