Critical SSRF Vulnerability in axios Package: Potential Credential Leakage

node-axios Updated 02 Oct 2025

Summary

07/03/2025
N/A
No i
Unrated
Not published

CVE-2025-27152: axios is a promise based HTTP client for the browser and node.js. Affects node-axios versions 0.21.1+dfsg-1 – 1.8.4+dfsg-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

axios is a widely-used promise-based HTTP client for both browser and Node.js environments. It simplifies making HTTP requests and handling responses, providing features like request and response interception, automatic JSON data transformation, and support for async/await. However, axios is vulnerable to a significant issue when absolute URLs are passed instead of protocol-relative URLs, which can lead to server-side request forgery (SSRF) and potential credential leakage.

Vulnerability Detail

The vulnerability arises when users pass absolute URLs to axios, disregarding the baseURL setting. This behavior can lead to unintended requests being sent to external servers, which may expose sensitive information or allow attackers to exploit the application through SSRF attacks. The issue affects both server-side and client-side implementations of axios, making it critical for developers to address.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using absolute URLs in your axios requests. Instead, use protocol-relative URLs or ensure that any URLs passed to axios are properly validated and sanitized to prevent SSRF vulnerabilities.

Conclusion

The axios package has a critical vulnerability that can lead to SSRF and credential leakage when absolute URLs are used. It is essential for developers to update to version 1.8.2 or later to mitigate this risk. Additionally, implementing proper URL validation can serve as a temporary workaround until an update can be applied.

See every vulnerability recorded for node-axios →

Share this vulnerability

FAQ

Server-Side Request Forgery (SSRF) is a security vulnerability that allows an attacker to send crafted requests from a vulnerable server to internal or external resources, potentially exposing sensitive data.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploiting this vulnerability can lead to unauthorized access to sensitive data, including credentials, and may allow attackers to perform actions on behalf of the application.

Yes, the vulnerability affects all versions of axios prior to 1.8.2. It is crucial to update to the latest version to mitigate the risk.

If an immediate update is not possible, ensure that you validate and sanitize all URLs passed to axios to prevent SSRF attacks.

Related vulnerabilities

Recent vulnerabilities recorded for node-axios.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback