-
Notifications
You must be signed in to change notification settings - Fork 3
chore(deps): update dependency axios to v0.30.2 [security] #643
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
develop
Choose a base branch
from
renovate/npm-axios-vulnerability
base: develop
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
681c0fa
to
b2664a8
Compare
b2664a8
to
8bdb2c4
Compare
8bdb2c4
to
cbcfdb3
Compare
cbcfdb3
to
6a12626
Compare
6a12626
to
401cbc2
Compare
401cbc2
to
6f8a772
Compare
86ea162
to
aea3ff7
Compare
aea3ff7
to
eb4c6c0
Compare
eb4c6c0
to
ef296a1
Compare
ef296a1
to
4d7b224
Compare
4d7b224
to
6ffcbad
Compare
6ffcbad
to
2a4c180
Compare
2a4c180
to
ee555b0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
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:
0.21.1
->0.30.2
GitHub Vulnerability Alerts
CVE-2021-3749
axios before v0.21.2 is vulnerable to Inefficient Regular Expression Complexity.
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-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)
v0.30.2
Compare Source
What's Changed
maxContentLength
vulnerability fix to v0.x by @FeBe95 in #7034New Contributors
Full Changelog: axios/axios@v0.30.1...v0.30.2
v0.30.1
Compare Source
Release notes:
Bug Fixes
Contributors to this release
Full Changelog: axios/axios@v0.30.0...v0.30.1
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
v0.28.1
Compare Source
Release notes:
Release notes:
Bug Fixes
req
is not defined (#6307)v0.28.0
Compare Source
Release notes:
Bug Fixes
withXSRFToken
option to v0.x (#6091)Backports from v1.x:
axios.formToJSON
method (#4735)url-encoded-form
serializer to respect theformSerializer
config (#4721)string[]
toAxiosRequestHeaders
type (#4322)AxiosError
stack capturing; (#4718)AxiosError
status code type; (#4717)blob
to the list of protocols supported by the browser (#4678)v0.27.2
Compare Source
Fixes and Functionality:
v0.27.1
Compare Source
Fixes and Functionality:
v0.27.0
Compare Source
Breaking changes:
Content-Type
request header when passing FormData (#3785)transformRequest
andtoFormData
(#4470)QOL and DevX improvements:
Fixes and Functionality:
Internal and Tests:
Documentation:
Notes:
v0.26.1
Compare Source
Fixes and Functionality:
v0.26.0
Compare Source
Fixes and Functionality:
v0.25.0
Compare Source
Breaking changes:
Fixes and Functionality:
boolean
andnumber
types (#4144)undefined
(#3153)Internal and Tests:
Documentation:
Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
v0.24.0
Compare Source
Breaking changes:
Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
v0.23.0
Compare Source
Breaking changes:
Fixes and Functionality:
Internal and Tests:
Documentation:
Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
v0.22.0
Compare Source
Fixes and Functionality:
Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
v0.21.4
Compare Source
Fixes and Functionality:
Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
v0.21.3
Compare Source
Fixes and Functionality:
Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
v0.21.2
Compare Source
Fixes and Functionality:
Internal and Tests:
Documentation:
AUTH_TOKEN
with multiple domain endpoints (#3539)Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
Configuration
📅 Schedule: Branch creation - "" (UTC), 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.
This PR was generated by Mend Renovate. View the repository job log.