[Aikido] Fix security issue in axios via major version upgrade from 0.21.4 to 1.18.0 - #308
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
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
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.
Upgrade Axios to fix critical SSRF and proxy bypass vulnerabilities affecting NO_PROXY hostname normalization and IPv6 address handling. This update includes breaking changes that require manual migration.
Breaking Change: Manual Content-Type header with FormData
Where your code is affected:
components/account_management/PersonalInfo.vuelines 247-256 in the_uploadAvatar()functionImpact: When uploading an avatar file, the code manually sets
'Content-Type': 'multipart/form-data'in the request headers. Starting from axios 0.27.0, axios no longer removes the Content-Type header when passing FormData. Manually setting this header prevents the browser from automatically adding the requiredboundaryparameter (e.g.,multipart/form-data; boundary=----WebKitFormBoundary...), which will cause the file upload to fail as the server won't be able to parse the multipart data correctly.Remediation: Remove the manual
Content-Typeheader setting from the axios request configuration when sending FormData. Axios and the browser will automatically set the correct Content-Type with the boundary parameter.All breaking changes by upgrading axios from version 0.21.4 to 1.18.0 (CHANGELOG)
Content-Typerequest header when passing FormDatahttp:andhttps:URLs that omit//are now rejected withERR_INVALID_URL, where they may have been accepted previously.✅ 37 CVEs resolved by this upgrade, including 2 critical 🚨 CVEs
This PR will resolve the following CVEs:
allowAbsoluteUrlsnot being set tofalseby default inbuildFullPath(), allowing attackers to bypass URL restrictions and process unintended URLs.formDataToJSONfunction allows attackers to manipulate object properties. Additionally, a ReDoS vulnerability incombineURLscan cause denial of service through malicious input.Object.prototype.proxyand intercept sensitive data like Authorization headers and request bodies. This requires prototype pollution elsewhere in the process and a compatible interceptor pattern.X-API-Keyand AWS tokens to unintended hosts, allowing attackers to steal sensitive authentication data. This information disclosure vulnerability affects shared environments where secret headers are set by default.{}to trigger stack overflow viaJSON.stringify(), causing denial of service in applications that serialize user-controlled data.0.0.0.0as a local address when evaluatingNO_PROXYrules, allowing requests to0.0.0.0to be routed through configured proxies instead of bypassing them. This enables SSRF attacks when attackers control request URLs and the proxy can reach local services.maxBodyLengthlimits on WHATWGReadableStreamrequest bodies with unknown sizes, allowing attackers to bypass upload size restrictions and cause unexpected network egress or resource exhaustion.formDataToJSONwhen processing deeply nested FormData field names causes stack overflow, resulting in denial of service for applications converting untrusted FormData to JSON.maxBodyLengthenforcement when sent over HTTP/2, allowing attackers to transmit arbitrarily large payloads and exhaust resources or bypass configured egress limits. This affects Node.js applications forwarding untrusted streams to HTTP/2 endpoints.formDataToJSONallows attackers to crash the process by submitting FormData with deeply nested bracket-delimited field names, causing stack exhaustion and denial of service.Object.prototypeproperties to inject maliciousAuthorizationheaders and manipulate query strings when applications pass placeholder objects likeauth: {}orparamsSerializer: {}. This enables credential exfiltration and request tampering when another component has already polluted the prototype chain.//(e.g.,https:internal.example) were silently normalized instead of rejected, allowing attackers to bypass URL allowlists or WAF checks and reach unintended hosts. The fix now throws an error for invalid scheme URLs before normalization.🤖 Remediation details
Fix critical/high/medium security vulnerabilities in
axiosShort summary
This PR remediates multiple CVEs and advisories affecting
axiosacross all severity levels. Two separate instances ofaxiosexisted in the dependency tree: one as a direct dependency of the root package, and one nested underhttp-cas-client. Both were updated to patched versions via edits to the rootpackage.jsonand a correspondingpackage-lock.jsonrefresh. A lockfile sync issue involving@emnapi/runtime(missing from the lockfile) was also resolved by walking the transitive chain throughvike→vite→rolldown.axios
axiosappeared in two places in the dependency tree. The direct dependency declared in the rootpackage.jsonwas bumped from1.16.1to1.18.0, which is the minimum version satisfying all patched version specs across the full set of advisories. A second instance atnode_modules/http-cas-client/node_modules/axioswas resolved at0.21.4becausehttp-cas-client@0.4.3pins^0.21.1;analyzePackageconfirmed no published version ofhttp-cas-clientever upgrades that range, so a scoped npmoverridesentry was added to the rootpackage.jsonforcingaxiosunderhttp-cas-clientto0.33.0(the minimum patched version in the 0.x series covering all advisories). The override targets only thehttp-cas-clientsubtree rather than applying globally.Version changes
axios1.16.11.18.0package.jsonaxios(underhttp-cas-client)0.21.40.33.0http-cas-clienthas no fixing release; scoped override applied in rootpackage.jsonvite(undervike)8.1.08.2.1@emnapi/runtime@1.11.3missing from lockfile;vikeallows>=6.3.0rolldown1.1.31.2.3viteundervike) —rolldown ~1.2.0required byvite@8.2.x@rolldown/binding-wasm32-wasi1.1.3rolldown@1.2.xbundle after parent bump@emnapi/runtime1.11.11.11.3vite/rolldownchain was updated