-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore(deps): update dependency axios to v1.12.0 [security] #32483
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
base: develop
Are you sure you want to change the base?
Conversation
See the guidelines for reviewing dependency updates for info on how to review dependency update PRs. |
0ec9f37
to
63abc50
Compare
63abc50
to
45b1514
Compare
a363897
to
79e1124
Compare
f00ab59
to
8a478e1
Compare
8a478e1
to
dcc387b
Compare
integrity sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA== | ||
version "1.12.2" | ||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.12.2.tgz#6c307390136cf7a2278d09cec63b136dfc6e6da7" | ||
integrity sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Monorepo Dependency Conflict Causes Multiple Axios Versions
The npm/vue
and npm/react
packages specify an exact axios@1.12.0
dependency. This conflicts with other monorepo dependencies that resolve to axios@1.12.2
in yarn.lock
. This leads to multiple axios
versions being installed, increasing bundle size and potentially causing runtime inconsistencies.
Note
Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to
mend[bot]
.This notice will be removed on 2025-10-07.
This PR contains the following updates:
1.11.0
->1.12.0
0.30.0
->1.12.0
1.8.2
->1.12.0
GitHub Vulnerability Alerts
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. Whenaxios
encounters 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.maxContentLength
orconfig.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
totalResponseBytes
exceeds[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
,maxBodyLength
and 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.maxContentLength
orconfig.maxBodyLength
is set, reject URIs whose payload exceeds the limit.Stream decoding
Instead of decoding the entire payload in one
Buffer.from
call, 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.0
Compare Source
Bug Fixes
Features
Contributors to this release
Configuration
📅 Schedule: Branch creation - "" in timezone America/New_York, 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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.