Skip to content

[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
stagingfrom
fix/aikido-security-update-packages-82891502-al9b
Closed

[Aikido] Fix security issue in axios via major version upgrade from 0.21.4 to 1.18.0#308
aikido-autofix[bot] wants to merge 1 commit into
stagingfrom
fix/aikido-security-update-packages-82891502-al9b

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

⚠️ Code affected by breaking changes.

⚠️ The axios upgrade from 0.21.4 to 1.18.0 contains a breaking change that affects this codebase:

Breaking Change: Manual Content-Type header with FormData

  • Where your code is affected: components/account_management/PersonalInfo.vue lines 247-256 in the _uploadAvatar() function

  • Impact: 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 required boundary parameter (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-Type header 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)

Version Description
0.23.0
Distinguish request and response data types
0.23.0
Change never type to unknown
0.24.0
Revert: change type of AxiosResponse to any
0.25.0
Fixing maxBodyLength enforcement
0.25.0
Adding error handling when missing url
0.27.0
Removed functionality that removed the Content-Type request header when passing FormData
0.27.0
Refactored error handling implementing AxiosError as a constructor
1.8.0
Add config for ignoring absolute URLs - code relying on the above will now combine the URLs instead of prefer request URL
0.32.0
mergeConfig and header merging now return objects with a null prototype to block prototype-pollution gadgets. Consumers must use Object.prototype.hasOwnProperty.call(obj, key) and avoid implicit string coercion against merged config or header objects.
1.18.0
Malformed http: and https: URLs that omit // are now rejected with ERR_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:

Issue Severity           Description
CVE-2026-42043
🚨 CRITICAL
[axios] An attacker who can influence the target URL can bypass NO_PROXY protection by using any address in the 127.0.0.0/8 range (except 127.0.0.1), allowing requests to reach unintended destinations. This enables potential information disclosure or unauthorized access to local services.
CVE-2025-62718
🚨 CRITICAL
[axios] Improper hostname normalization in NO_PROXY rule checking allows requests to loopback addresses (localhost., [::1]) to bypass proxy protections, enabling proxy bypass and potential SSRF attacks against internal services. This vulnerability permits attackers to reach sensitive services despite configured NO_PROXY protections.
CVE-2026-44492
HIGH
[axios] Axios fails to normalize IPv4-mapped IPv6 addresses when checking NO_PROXY rules, allowing requests to bypass proxy restrictions and reach internal services. This enables attackers to access services that should be blocked, such as metadata endpoints.
CVE-2026-44490
HIGH
[axios] Axios contains prototype pollution gadgets that allow upstream dependencies to inject malicious values into HTTP headers or cause synchronous TypeErrors on every request. This enables information disclosure or denial of service attacks when Object.prototype is polluted by other libraries.
AIKIDO-2026-10741
HIGH
[axios] An HTTP client vulnerability allows prototype pollution through loose object merging, sensitive data exposure via error serialization, and improper proxy/socket handling that could lead to information disclosure or unauthorized access.
CVE-2026-40175
HIGH
[axios] A prototype pollution vulnerability in a third-party dependency can be exploited to inject unsanitized header values into outbound HTTP requests. This allows attackers to manipulate request headers, potentially leading to request smuggling, cache poisoning, or other header-based attacks.
CVE-2026-25639
HIGH
[axios] The mergeConfig function crashes with a TypeError when processing configuration objects containing proto as an own property, allowing attackers to trigger denial of service. An attacker can exploit this by providing a malicious configuration object created via JSON.parse().
CVE-2026-44496
HIGH
[axios] A regular expression built from the XSRF cookie name without escaping metacharacters allows attackers to cause expensive regex backtracking, resulting in client-side denial of service by freezing the browser tab during request preparation.
CVE-2026-44487
HIGH
[axios] Axios's Node.js HTTP adapter may leak Proxy-Authorization credentials to redirected origins when following redirects from proxied to direct connections, allowing credential disclosure. This occurs when an authenticated proxy request redirects to a non-proxied URL, potentially exposing proxy credentials to the final destination.
CVE-2026-44486
HIGH
[axios] Axios' Node.js HTTP adapter leaks proxy credentials to redirect targets when following redirects through authenticated proxies, allowing the Proxy-Authorization header to persist on redirected requests. This information disclosure vulnerability affects Node.js environments with automatic redirects and authenticated proxy configurations enabled.
CVE-2026-42039
HIGH
[axios] A deeply nested object passed as request data causes the toFormData function to recursively walk without depth limits, crashing the Node.js process with a RangeError (Denial of Service). This vulnerability allows attackers to trigger application crashes through maliciously crafted nested payloads.
CVE-2026-42038
HIGH
[axios] Incomplete hostname normalization in no_proxy bypass allows requests to IP loopback addresses (127.0.0.1, [::1]) to route through proxy when no_proxy=localhost is set, enabling proxy bypass circumvention. This occurs due to pure string matching without IP alias resolution.
CVE-2026-42035
HIGH
[axios] A prototype pollution gadget in the HTTP adapter allows attackers to inject arbitrary HTTP headers into outgoing requests by polluting Object.prototype with specific properties. This enables header injection attacks that could lead to request manipulation and potential security bypasses.
CVE-2026-42033
HIGH
[axios] A prototype pollution vulnerability allows attackers to intercept and modify JSON responses or hijack HTTP transport to access credentials and headers. This requires prior prototype pollution from a co-dependency but enables complete request/response manipulation.
AIKIDO-2026-10509
HIGH
[axios] Prototype pollution vulnerability allows attackers to inject malicious headers into requests through unsafe FormData detection and header merging, potentially enabling authorization bypass or request manipulation.
CVE-2026-44495
HIGH
[axios] Contains prototype-pollution gadgets in request config processing that could be exploited if Object.prototype is already polluted by another vulnerability, potentially allowing arbitrary code execution or request manipulation. Requires a separate prototype-pollution vulnerability or prior attacker control over Object.prototype to be exploitable.
CVE-2023-45857
MEDIUM
[axios] 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-2026-42041
MEDIUM
[axios] A Prototype Pollution vulnerability allows attackers to suppress HTTP error responses by polluting Object.prototype.validateStatus, causing all status codes to be treated as successful and bypassing authentication and error handling.
AIKIDO-2025-10185
MEDIUM
[axios] A server-side request forgery (SSRF) vulnerability exists due to allowAbsoluteUrls not being set to false by default in buildFullPath(), allowing attackers to bypass URL restrictions and process unintended URLs.
CVE-2026-42042
MEDIUM
[axios] Uses truthy/falsy semantics instead of strict boolean comparison for XSRF token protection, allowing attackers to bypass same-origin checks via prototype pollution or misconfiguration and steal XSRF tokens sent to cross-origin servers. This enables CSRF attacks against protected endpoints.
CVE-2025-27152
MEDIUM
[axios] Axios sends requests to absolute URLs even when baseURL is configured, bypassing intended routing and potentially causing Server-Side Request Forgery (SSRF) and credential leakage in both server and client environments.
CVE-2026-42036
MEDIUM
[axios] When responseType is set to 'stream', the library fails to enforce maxContentLength limits, allowing attackers to bypass response-size restrictions and cause denial of service through unbounded data consumption.
CVE-2026-42034
MEDIUM
[axios] A vulnerability allows attackers to bypass the maxBodyLength restriction on stream request bodies when maxRedirects is set to 0, enabling oversized uploads to be sent despite strict body limits. This could lead to denial of service or resource exhaustion attacks.
AIKIDO-2023-10001
LOW
[axios] Prototype pollution vulnerability in the formDataToJSON function allows attackers to manipulate object properties. Additionally, a ReDoS vulnerability in combineURLs can cause denial of service through malicious input.
CVE-2026-42040
LOW
[axios] A character mapping in the encode() function incorrectly reverses percent-encoding of null bytes, converting %00 back to raw null bytes and potentially enabling injection attacks in certain contexts. The vulnerability has limited impact as standard axios request flows are unaffected.
GHSA-gcfj-64vw-6mp9
HIGH
[axios] Request interceptors that return plain object clones can bypass prototype pollution hardening in the Node.js HTTP adapter, allowing attackers to route authenticated requests through a polluted Object.prototype.proxy and intercept sensitive data like Authorization headers and request bodies. This requires prototype pollution elsewhere in the process and a compatible interceptor pattern.
AIKIDO-2026-291630
HIGH
[axios] Cross-origin redirects leak custom credential headers like X-API-Key and 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.
GHSA-hcpx-6fm6-wx23
MEDIUM
[axios] Incomplete depth-limit bypass in form data serialization allows attackers with control over object keys ending in {} to trigger stack overflow via JSON.stringify(), causing denial of service in applications that serialize user-controlled data.
GHSA-f4gw-2p7v-4548
MEDIUM
[axios] Axios does not treat 0.0.0.0 as a local address when evaluating NO_PROXY rules, allowing requests to 0.0.0.0 to 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.
GHSA-jqh4-m9w3-8hp9
MEDIUM
[axios] The fetch adapter fails to enforce maxBodyLength limits on WHATWG ReadableStream request bodies with unknown sizes, allowing attackers to bypass upload size restrictions and cause unexpected network egress or resource exhaustion.
GHSA-42h9-826w-cgv3
MEDIUM
[axios] Uncontrolled recursion in formDataToJSON when processing deeply nested FormData field names causes stack overflow, resulting in denial of service for applications converting untrusted FormData to JSON.
GHSA-mwf2-3pr3-8698
MEDIUM
[axios] Streamed request bodies bypass maxBodyLength enforcement 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.
GHSA-pmv8-rq9r-6j72
MEDIUM
[axios] Uncontrolled recursion in formDataToJSON allows attackers to crash the process by submitting FormData with deeply nested bracket-delimited field names, causing stack exhaustion and denial of service.
GHSA-xj6q-8x83-jv6g
MEDIUM
[axios] Prototype pollution read-side gadgets in Basic auth subfield handling allow attackers to inject attacker-controlled credentials into outbound Authorization headers when an application passes an empty or partial auth object to axios after prototype pollution occurs elsewhere in the process. This enables credential exfiltration and outbound request tampering.
GHSA-mmx7-hfxf-jppx
MEDIUM
[axios] Prototype pollution read-side gadgets in axios allow attackers who pollute Object.prototype to hijack requests by injecting malicious data, proxy settings, or parameter serializers into bodyless methods and low-level adapter calls. This can result in credential theft, request body injection, traffic redirection, or URL manipulation depending on the attack vector.
GHSA-7q8q-rj6j-mhjq
MEDIUM
[axios] Prototype pollution in nested request options allows inherited Object.prototype properties to inject malicious Authorization headers and manipulate query strings when applications pass placeholder objects like auth: {} or paramsSerializer: {}. This enables credential exfiltration and request tampering when another component has already polluted the prototype chain.
AIKIDO-2026-38469
MEDIUM
[axios] Malformed HTTP/HTTPS URLs without // (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 axios

Short summary

This PR remediates multiple CVEs and advisories affecting axios across all severity levels. Two separate instances of axios existed in the dependency tree: one as a direct dependency of the root package, and one nested under http-cas-client. Both were updated to patched versions via edits to the root package.json and a corresponding package-lock.json refresh. A lockfile sync issue involving @emnapi/runtime (missing from the lockfile) was also resolved by walking the transitive chain through vikeviterolldown.

axios

axios appeared in two places in the dependency tree. The direct dependency declared in the root package.json was bumped from 1.16.1 to 1.18.0, which is the minimum version satisfying all patched version specs across the full set of advisories. A second instance at node_modules/http-cas-client/node_modules/axios was resolved at 0.21.4 because http-cas-client@0.4.3 pins ^0.21.1; analyzePackage confirmed no published version of http-cas-client ever upgrades that range, so a scoped npm overrides entry was added to the root package.json forcing axios under http-cas-client to 0.33.0 (the minimum patched version in the 0.x series covering all advisories). The override targets only the http-cas-client subtree rather than applying globally.

Version changes

Package From To Why updated
axios 1.16.1 1.18.0 Direct CVE fix — declared spec updated in root package.json
axios (under http-cas-client) 0.21.4 0.33.0 CVE fix via override — http-cas-client has no fixing release; scoped override applied in root package.json
vite (under vike) 8.1.0 8.2.1 Lockfile sync — bumped transitively to resolve @emnapi/runtime@1.11.3 missing from lockfile; vike allows >=6.3.0
rolldown 1.1.3 1.2.3 Transitive after parent bump (vite under vike) — rolldown ~1.2.0 required by vite@8.2.x
@rolldown/binding-wasm32-wasi 1.1.3 (removed as separate instance) Absorbed into rolldown@1.2.x bundle after parent bump
@emnapi/runtime 1.11.1 1.11.3 Lockfile sync — previously missing from lockfile; resolved at root after vite/rolldown chain was updated

@jakeaturner jakeaturner closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant