-
Notifications
You must be signed in to change notification settings - Fork 3
chore(deps): update dependency axios to v1.12.0 [security] #1003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
staging
Choose a base branch
from
renovate/npm-axios-vulnerability
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## staging #1003 +/- ##
========================================
Coverage 75.15% 75.15%
========================================
Files 53 53
Lines 1103 1103
========================================
Hits 829 829
Misses 274 274 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b72ec93 to
0b654b7
Compare
|
fails to publish a image https://github.com/csvalpha/sofia/actions/runs/12848324176 |
|
could be that #877 is required |
33e649f to
2551cc5
Compare
2551cc5 to
add7af2
Compare
1051d52 to
444d66c
Compare
444d66c to
6b6b034
Compare
dfb5890 to
5fefb16
Compare
5fefb16 to
132b364
Compare
132b364 to
2340d89
Compare
a07144e to
4a19b95
Compare
4a19b95 to
96aa00f
Compare
96aa00f to
7fb2838
Compare
7fb2838 to
6fb54ad
Compare
6fb54ad to
0dd25ca
Compare
439aa7f to
f6f3542
Compare
f6f3542 to
b49a39f
Compare
b49a39f to
1d6417a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.4.0->1.12.0GitHub 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-2024-39338
axios 1.7.2 allows SSRF via unexpected behavior where requests for path relative URLs get processed as protocol relative URLs.
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
baseURLis 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:
In this example, the request is sent to
http://attacker.test/instead of thebaseURL. As a result, the domain owner ofattacker.testwould receive theX-API-KEYincluded in the request headers.It is recommended that:
baseURLis set, passing an absolute URL such ashttp://attacker.test/toget()should not ignorebaseURL.baseURLwith the user-provided parameter), axios should verify that the resulting URL still begins with the expectedbaseURL.PoC
Follow the steps below to reproduce the issue:
Even though
baseURLis set tohttp://localhost:10001/, axios sends the request tohttp://localhost:10002/.Impact
baseURLand does not validate path parameters is affected by this issue.CVE-2025-58754
Summary
When Axios runs on Node.js and is given a URL with the
data:scheme, it does not perform HTTP. Instead, its Node http adapter decodes the entire payload into memory (Buffer/Blob) and returns a synthetic 200 response.This path ignores
maxContentLength/maxBodyLength(which only protect HTTP responses), so an attacker can supply a very largedata:URI and cause the process to allocate unbounded memory and crash (DoS), even if the caller requestedresponseType: 'stream'.Details
The Node adapter (
lib/adapters/http.js) supports thedata:scheme. Whenaxiosencounters a request whose URL starts withdata:, it does not perform an HTTP request. Instead, it callsfromDataURI()to decode the Base64 payload into a Buffer or Blob.Relevant code from
[httpAdapter](https://redirect.github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/adapters/http.js#L231):The decoder is in
[lib/helpers/fromDataURI.js](https://redirect.github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/helpers/fromDataURI.js#L27):config.maxContentLengthorconfig.maxBodyLength, which only apply to HTTP streams.data:URI of arbitrary size can cause the Node process to allocate the entire content into memory.In comparison, normal HTTP responses are monitored for size, the HTTP adapter accumulates the response into a buffer and will reject when
totalResponseBytesexceeds[maxContentLength](https://redirect.github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/adapters/http.js#L550). No such check occurs fordata:URIs.PoC
Run with limited heap to force a crash:
Since Node heap is capped at 100 MB, the process terminates with an out-of-memory error:
Mini Real App PoC:
A small link-preview service that uses axios streaming, keep-alive agents, timeouts, and a JSON body. It allows data: URLs which axios fully ignore
maxContentLength,maxBodyLengthand decodes into memory on Node before streaming enabling DoS.Run this app and send 3 post requests:
Suggestions
Enforce size limits
For
protocol === 'data:', inspect the length of the Base64 payload before decoding. Ifconfig.maxContentLengthorconfig.maxBodyLengthis set, reject URIs whose payload exceeds the limit.Stream decoding
Instead of decoding the entire payload in one
Buffer.fromcall, decode the Base64 string in chunks using a streaming Base64 decoder. This would allow the application to process the data incrementally and abort if it grows too large.Release Notes
axios/axios (axios)
v1.12.0Compare Source
Bug Fixes
Features
Contributors to this release
v1.11.0Compare Source
Bug Fixes
Contributors to this release
v1.10.0Compare Source
Bug Fixes
Features
Contributors to this release
v1.9.0Compare Source
Bug Fixes
getSetCookieby using 'get' method for caseless access; (#6874) (d4f7df4)Features
Contributors to this release
1.8.4 (2025-03-19)
Bug Fixes
allowAbsoluteUrls: falsewithoutbaseURL(#6833) (f10c2e0)Contributors to this release
1.8.3 (2025-03-10)
Bug Fixes
allowAbsoluteUrlstobuildFullPathinxhrandfetchadapters (#6814) (ec159e5)Contributors to this release
1.8.2 (2025-03-07)
Bug Fixes
Contributors to this release
1.8.1 (2025-02-26)
Bug Fixes
generateStringto platform utils to avoid importing crypto module into client builds; (#6789) (36a5a62)Contributors to this release
v1.8.4Compare Source
Bug Fixes
allowAbsoluteUrls: falsewithoutbaseURL(#6833) (f10c2e0)Contributors to this release
v1.8.3Compare Source
Bug Fixes
getSetCookieby using 'get' method for caseless access; (#6874) (d4f7df4)Features
Contributors to this release
1.8.4 (2025-03-19)
Bug Fixes
allowAbsoluteUrls: falsewithoutbaseURL(#6833) (f10c2e0)Contributors to this release
1.8.3 (2025-03-10)
Bug Fixes
allowAbsoluteUrlstobuildFullPathinxhrandfetchadapters (#6814) (ec159e5)Contributors to this release
1.8.2 (2025-03-07)
Bug Fixes
Contributors to this release
1.8.1 (2025-02-26)
Bug Fixes
generateStringto platform utils to avoid importing crypto module into client builds; (#6789) (36a5a62)Contributors to this release
v1.8.2Compare Source
Bug Fixes
getSetCookieby using 'get' method for caseless access; (#6874) (d4f7df4)Features
Contributors to this release
1.8.4 (2025-03-19)
Bug Fixes
allowAbsoluteUrls: falsewithoutbaseURL(#6833) (f10c2e0)Contributors to this release
1.8.3 (2025-03-10)
Bug Fixes
allowAbsoluteUrlstobuildFullPathinxhrandfetchadapters (#6814) (ec159e5)Contributors to this release
1.8.2 (2025-03-07)
Bug Fixes
Contributors to this release
1.8.1 (2025-02-26)
Bug Fixes
generateStringto platform utils to avoid importing crypto module into client builds; (#6789) (36a5a62)Contributors to this release
v1.8.1Compare Source
Bug Fixes
getSetCookieby using 'get' method for caseless access; (#6874) (d4f7df4)Features
Contributors to this release
1.8.4 (2025-03-19)
Bug Fixes
allowAbsoluteUrls: falsewithoutbaseURL(#6833) (f10c2e0)Contributors to this release
1.8.3 (2025-03-10)
Bug Fixes
allowAbsoluteUrlstobuildFullPathinxhrandfetchadapters (#6814) (ec159e5)Contributors to this release
1.8.2 (2025-03-07)
Bug Fixes
Contributors to this release
1.8.1 (2025-02-26)
Bug Fixes
generateStringto platform utils to avoid importing crypto module into client builds; (#6789) (36a5a62)Contributors to this release
v1.8.0Compare 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
globalThis.TextEncoderwhen available (#6634) (df956d1)Contributors to this release
Configuration
📅 Schedule: Branch creation - "" in timezone Europe/Amsterdam, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.