Skip to main content
Mallory
HighPublic exploit

SSRF and Credential Leakage in Axios baseURL Handling

IdentifiersCVE-2025-27152CWE-918· Server-Side Request Forgery (SSRF)

Axios contains a flaw in request URL handling where supplying an absolute URL to request methods overrides the configured baseURL instead of remaining constrained to the intended origin. As described in the provided content, when applications rely on baseURL for request scoping but pass attacker-controlled or otherwise untrusted absolute URLs, Axios will send the request to that absolute destination. This can result in server-side request forgery in server-side deployments and can also leak credentials or sensitive headers to unintended third-party hosts. The issue affects both server-side and client-side usage of Axios and is fixed in Axios 1.8.2.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause the vulnerable application to issue outbound requests to attacker-chosen or internal destinations, enabling SSRF against internal services or arbitrary external hosts. Where the application attaches authentication material or sensitive headers to Axios requests, those credentials may be transmitted to the attacker-controlled destination, resulting in credential or API key leakage. In server-side contexts this may expose internal network resources; in client-side contexts it may disclose tokens or headers to unintended origins.

Mitigation

If you can’t patch tonight, do this now.

Until the upgrade is applied, do not pass untrusted absolute URLs into Axios request methods when using baseURL. Validate and sanitize user-controlled URL or path inputs, reject absolute URLs where only relative paths are expected, and enforce destination allowlisting. In server-side environments, restrict outbound network access to only required hosts and segments to reduce SSRF blast radius and limit the impact of accidental credential forwarding.

Remediation

Patch, then assume compromise.

Upgrade Axios to version 1.8.2 or later, which fixes the absolute-URL handling issue described in the content. Review application code that uses baseURL and ensure request targets derived from user input cannot bypass intended origin restrictions by supplying absolute URLs. Where possible, enforce explicit allowlists for destinations and verify that constructed request URLs remain within the expected baseURL scope before dispatch.
PUBLIC EXPLOITS

Exploits

2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 2 / 3 TOTALView more in app
axios-CVE-2025-27152-PoCMaturityPoCVerified exploit

This repository contains two HTML/JavaScript proof-of-concept files demonstrating CVE-2025-27152, a credential leak vulnerability in Axios v1.6.8 when used in a browser context. Both files create an Axios client with a preset baseURL, and in the case of 'axios-credsteal.html', also set an Authorization header and enable withCredentials. The user is prompted to enter an absolute URL, which is then used as the target for an Axios GET request. This allows an attacker to supply a malicious endpoint (such as a webhook or controlled server) and receive sensitive credentials (headers and cookies) from the victim's browser. The exploit demonstrates how improper handling of absolute URLs in Axios can lead to credential leakage across origins. The repository is structured as two standalone HTML files, each serving as an independent PoC for the vulnerability.

davidblakecoeDisclosed Jun 6, 2025htmljavascriptbrowser
axios-ssrfMaturityPoCVerified exploit

This repository is a full-stack demonstration application (Angular frontend, NestJS backend) designed to showcase two specific vulnerabilities: SSRF (Server-Side Request Forgery) and Path Traversal, specifically in the context of the axios library (version 1.8.1, vulnerable to CVE-2025-27152). The backend exposes API endpoints for movie data, using axios to interact with the external TMDB API. The SSRF vulnerability is present in the backend's search functionality, where user-supplied input is used in requests to external URLs via axios. The Path Traversal vulnerability is present in the downloads middleware, which allows crafted URLs to access files outside the intended directory (e.g., '/api/downloads/linda/..%2f..%2f..%2fdist%2fmain.ts'). The README provides explicit instructions for exploiting both vulnerabilities. The repository is structured into 'backend' (NestJS API) and 'frontend' (Angular app) directories, with supporting configuration and test files. The main entry points for exploitation are the backend API endpoints, which can be accessed directly or via the frontend. The code is intended for educational and demonstration purposes, not as a weaponized exploit.

andreglockDisclosed Mar 30, 2025typescriptjavascriptnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
AxiosAxiosapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence2

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity4

Community discussion across Reddit, Mastodon, and other social sources.