Repository navigation
fix(security): fix 20 security issues in axios, undici - #293
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
3 tasks
✅ Security Analysis ResultsNo security issues found. 2 files reviewed.
|
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.
Overview
Jira ticket: https://typeform.atlassian.net/browse/<TICKET_ID>
Patches axios and undici to fix high-severity SSRF and proxy-bypass flaws, plus credential leaks on redirects, where NO_PROXY/proxy:false were ignored and Authorization/Cookie headers were forwarded to subdomains.
Changes
Testing
Security Impact — CVE vulnerabilities fixed by this PR
✅ 20 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
In Axios 0.19.0–0.34.0 and 1.0.0–1.20.0 (fixed in 0.35.0 and 1.21.0), the Node HTTP adapter can send requests through an environment-configured proxy even when
NO_PROXYnames the destination using an equivalent Unicode IDN or expanded IPv6 form. The Unicode IDN case affect...Axios’s Node HTTP adapter can fail to honor proxy: false when the selected Node agent has native proxyEnv support enabled. On Node 22.21.0+ or 24.5.0+, this can occur with NODE_USE_ENV_PROXY=1, --use-env-proxy, or an explicitly configured proxy-enabled agent. A configured pr...
Axios’s Node.js HTTP adapter can forward caller-supplied Authorization and Cookie headers when a trusted server redirects a request to a strict subdomain of the current host.
Axios delegates default redirect handling to follow-redirects. That package deliberately treats a...
Axios versions 0.27.0 through 0.34.0 and 1.0.0 through 1.20.0 contain an uncontrolled resource-consumption issue in request serialization. When a top-level object key ends in [], Axios treats its value as array-like and trusts any numeric length. A small attacker-controlled ...
follow-redirects, which strips standard credential headers such asAuthorizationon cross-origin hops but leaves caller-defined secret headers likeX-API-Keyuntouched. A server that responds with a cross-origin redirect can therefo...buildFullPath(), letting attackers bypass URL restrictions and reach blocked endpoints. This also bypasses the prior CVE-2025-27152 fix.axiosaccepted malformedhttp:andhttps:URLs that omitted//, such ashttps:internal.example, which could evade naive allowlist or WAF checks and reach unintended hosts. The library silently normalized these inputs instead of rejecting them. The f...axiosversion 1.6.4 and version 0.29.0. Notably, a prototype pollution flaw impacted theformDataToJSONfunction, posing a significant risk. Additionally, a Regular Expression Denial of Service (ReDoS) vulnerability was identifi...Breaking Changes & Upgrade Impact
✅ Code not affected by breaking changes.
✅ No breaking changes from either axios or undici upgrades affect this codebase.
Axios (0.27.2 => 1.18.0):
The codebase uses
analytics-nodelibrary which creates an axios instance viaaxios.create(options.axiosConfig)and makes POST requests usingthis.axiosInstance.post(\${this.host}${this.path}`, data, req)`.The URL is constructed manually by concatenating
this.hostandthis.pathstrings, not relying on axios'sbaseURL+urlcombination feature.The breaking change about URL combining (version 1.8.0) does not apply since the code doesn't use both
baseURLandurlconfig options together.Undici (6.24.1 => 6.29.2):
The codebase does not directly use undici's WebSocket functionality.
The codebase does not use
parseSetCookie()orsetCookie()functions from undici.While undici is bundled in the dist file (as a dependency), the actual source code (
deployment-frequency-event.js) only uses@actions/coreandanalytics-node, which in turn uses axios for HTTP requests, not undici's cookie or WebSocket features.All breaking changes by upgrading axios from version 0.27.2 to 1.21.0 (CHANGELOG)
All breaking changes by upgrading undici from version 6.24.1 to 6.29.2 (CHANGELOG)
parseSetCookieno longer decodes percent-encoded sequences in cookie values, which may break applications expecting decoded values like literal CR/LF from%0D%0A(CVE-2026-9679)SameSitevalues (Strict,Lax,None), rejecting previously accepted substring matches likeSameSite=NoneOfYourBusiness(CVE-2026-11525)Content-Lengthinconsistent withContent-Rangeare now rejected, which may cause requests that previously succeeded to fail (GHSA-8xcm-r25x-g524)setCookie()now validates and sanitizes these values more strictly, rejecting previously accepted malformed inputs (GHSA-v3r7-h72x-cjcm)Fix Details / Technical Implementation
🤖 Remediation details
Security: upgrade axios and undici in
shared-actions/send-deployment-eventThis PR fixes the vulnerable
axios(0.27.2) andundici(6.24.1) packages. Both are transitive dependencies. The changes are inshared-actions/send-deployment-event/package.json, which gets a newresolutionsentry, and inyarn.lock.axios
axioscomes in only throughanalytics-node@6.2.0, which declaresaxios@^0.27.2. That is the latestanalytics-noderelease, so no parent bump can reach a patched axios. Aresolutionsentry pinsaxiosto1.21.0, the lowest version that meets every fix floor. An earlier pin of1.18.0left several GHSA advisories open, which is why the final pin is1.21.0. This movesanalytics-nodeacross a major version, from axios 0.x to 1.x, and that combination has not been run. The newer axios also pulled in updated transitive packages (follow-redirects,form-data,https-proxy-agent,proxy-from-envand others).undici
undicicomes in through@actions/http-client@4.0.0, which declaresundici@^6.23.0. That range already allows the patched6.29.2, so onlyyarn.lockchanged. No manifest edit or resolution was needed. The environment's package-age filter hid the newest releases, so the install used--safe-chain-skip-minimum-package-ageto reach6.29.2.Version changes
resolutionspin becauseanalytics-nodecaps it at^0.27.2@actions/http-clientrange^6.23.0form-datahttps-proxy-agenthttps-proxy-agentDocs
For contributions to the
Typeform/.githubrepoNote: Please do not use this repository for new internal shared workflows and actions. Use https://github.com/Typeform/.github-private instead!
Please check that your contribution applies to one of these cases below. If this is not the case, please contribute to https://github.com/Typeform/.github-private instead.