CVE-2025-27152
JavaScript vulnerability analysis and mitigation

Overview

A critical security vulnerability (CVE-2025-27152) has been discovered in Axios, a popular promise-based HTTP client for browsers and Node.js. The vulnerability affects all versions up to and including 1.7.9, with a CVSSv4 score of 7.7 (HIGH). The flaw occurs when passing absolute URLs rather than protocol-relative URLs to axios. Even when baseURL is set, axios sends the request to the specified absolute URL, potentially leading to Server-Side Request Forgery (SSRF) and credential leakage. This issue impacts both server-side and client-side usage of axios (Security Online, GitHub Advisory).

Technical details

The vulnerability stems from how Axios handles absolute URLs in requests. When baseURL is set and an absolute URL is passed to the request method, Axios ignores the baseURL setting and sends the request to the specified absolute URL instead of validating that the resulting URL begins with the expected baseURL. This behavior occurs in the URL parsing and preparation process for server-side requests. The issue has been assigned a CWE-918 (Server-Side Request Forgery) classification (NVD, GitHub Advisory).

Impact

The vulnerability has significant implications for applications using Axios. The primary impacts include potential credential leakage, where sensitive API keys or credentials configured in Axios could be exposed to unintended third-party hosts, and Server-Side Request Forgery (SSRF) vulnerabilities allowing attackers to send requests to internal network resources. Given Axios's widespread usage, with over 251 million downloads per month, the potential impact is extensive. Software that uses baseURL and does not validate path parameters is particularly vulnerable (Security Online, GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Axios version 1.8.2. Organizations and developers using Axios are strongly advised to upgrade to this version or later immediately. Additionally, implementing proper validation of path parameters and avoiding the use of absolute URLs in Axios requests can help mitigate the risk (Security Online, GitHub Advisory).

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