-
Notifications
You must be signed in to change notification settings - Fork 3
Update dependency axios to v1.12.0 [SECURITY] #49
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
Conversation
|
The axios library has been updated from version 1.11.0 to 1.12.0 in both the Walkthrough
Model: o4-mini | Prompt Tokens: 438 | Completion Tokens: 362 |
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.
Our AI-assisted review can provide helpful feedback on your code. Predictions aren’t guaranteed facts, so pick the suggestions that fit your needs. You remain in charge of your project while AI acts as a supportive partner.
Model: o4-mini | Prompt Tokens: 880 | Completion Tokens: 1990
| "@sap-ai-sdk/ai-api": "1.18.0", | ||
| "@sap-ai-sdk/orchestration": "1.18.0", | ||
| "axios": "1.11.0", | ||
| "axios": "1.12.0", |
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.
You’ve pinned the axios dependency to an exact patch version. To benefit from future patch updates (bug fixes and security patches) without manual bumps, consider using a semver range (e.g., ^1.12.0) instead of an exact version. For example:
{
"dependencies": {
"axios": "^1.12.0",
// …other deps
}
}| "@sap-ai-sdk/ai-api": "1.18.0", | ||
| "@sap-ai-sdk/orchestration": "1.18.0", | ||
| "axios": "1.11.0", | ||
| "axios": "1.12.0", |
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.
Similar to the other package, axios is currently locked to 1.12.0. Using a caret range like ^1.12.0 will allow safe patch upgrades and reduce maintenance overhead:
{
"dependencies": {
"axios": "^1.12.0",
// …other deps
}
}| "@octokit/webhooks": "13.9.1", | ||
| "@sap-ai-sdk/ai-api": "1.18.0", | ||
| "@sap-ai-sdk/orchestration": "1.18.0", | ||
| "axios": "1.11.0", | ||
| "axios": "1.12.0", | ||
| "minimatch": "10.0.3", | ||
| "mollitia": "0.2.0", | ||
| "octokit": "5.0.3", |
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.
The dependency lists in both pr-review and pr-summary are identical. To avoid duplication and ensure consistent versions, you could hoist common dependencies to the monorepo root using a workspace setup. For example, in your root package.json:
{
"private": true,
"workspaces": [
"pr-review",
"pr-summary"
],
"dependencies": {
"@octokit/webhooks": "13.9.1",
"@sap-ai-sdk/ai-api": "1.18.0",
"@sap-ai-sdk/orchestration": "1.18.0",
"axios": "^1.12.0",
"minimatch": "10.0.3",
"mollitia": "0.2.0",
"octokit": "5.0.3"
}
}Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
1.11.0->1.12.0GitHub 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. 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
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.