fix(security): fix 13 security issues in axios, undici - #268
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>
Upgrade axios and undici to fix SSRF/proxy bypass, prototype pollution header injection, credential leakage on cross-origin redirects, and unsafe error serialization vulnerabilities.
Changes
🤖 Remediation details
Fix security vulnerabilities in
axiosandundicitransitive dependenciesShort summary
This PR remediates multiple high- and medium-severity vulnerabilities in two transitive dependencies —
axiosandundici— withinshared-actions/send-deployment-event. Changes touchshared-actions/send-deployment-event/package.json(new direct dependency entry, newresolutionsfield) andshared-actions/send-deployment-event/yarn.lock(lockfile entries refreshed to patched resolved versions).axios
axioswas pulled in transitively by the direct dependencyanalytics-node@6.2.0, which declaresaxios@^0.27.2, resolving to the vulnerable0.27.2. Becauseanalytics-node@6.2.0is the latest published release and still pins^0.27.2(a range that cannot resolve to the patched1.xline across the semver-major boundary), no parent bump was possible. To force both the direct and transitive selectors to a safe version,axios@^1.18.0was added as an explicit direct dependency and aresolutionsentry"axios": "^1.18.0"was added to the samepackage.json, causing Yarn to resolve both the^0.27.2and^1.18.0selectors to a single patched lockfile entry (1.20.0).undici
undiciwas pulled in transitively by@actions/http-client@4.0.0(itself a dependency of@actions/core@3.0.1), which declaresundici@^6.23.0. That range already permits6.26.0+, so no manifest change was required forundiciitself — a lockfile refresh viayarn upgrade 'undici@^6.23.0'was sufficient to advance the resolved version from the vulnerable6.24.1to the patched6.28.1.Version changes
axios0.27.21.20.0resolutionsrequired because sole parentanalytics-node@6.2.0pins^0.27.2with no newer releaseundici6.24.16.28.1^6.23.0already admitted patched versionTesting
Docs
Security Impact — CVE vulnerabilities fixed by this PR
✅ 13 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
X-API-Key) during cross-origin redirects, potentially leaking API keys and authentication tokens to unintended hosts. This information disclosure vulnerability affects shared environments where secret headers are set by default.allowAbsoluteUrlsnot being set tofalseby default inbuildFullPath(), allowing attackers to bypass URL restrictions and process unintended URLs.//(e.g.,https:internal.example), allowing attackers to bypass URL allowlists or WAF checks and reach unintended hosts. The vulnerability enables URL validation bypass through silent normalization of invalid URLs.formDataToJSONfunction allows attackers to modify object prototypes. Additionally, a ReDoS vulnerability incombineURLscan cause denial of service through malicious input.Breaking Changes & Upgrade Impact
✅ No breaking changes from the axios upgrade affect this codebase.
The codebase does not directly use axios - it only uses the
analytics-nodepackage which internally depends on axios. Theanalytics-nodepackage uses axios in a simple way: it creates an axios instance without abaseURLand makes POST requests with complete absolute URLs (https://api.segment.io/v1/batch). This usage pattern is not affected by the URL combination breaking change in axios 1.8.0.Additionally, the source code does not use any deprecated axios features like
CancelToken,axios.Cancel,axios.all, oraxios.spreadthat were changed in axios 1.0.0.All breaking changes by upgrading undici from version 6.24.1 to 6.28.1 (CHANGELOG)
parseSetCookieno longer applies percent-decoding to cookie values, changing behavior for cookies containing encoded sequences like%0D%0Aand%00SameSitevalues (Strict,Lax,None) rather than accepting them as substrings, rejecting previously accepted values likeSameSite=NoneOfYourBusinessContent-Lengthis inconsistent withContent-Range, where previously inconsistent responses may have been acceptedsetCookie()now applies stricter validation that may reject previously accepted unsanitized domain and unparsed valuestypeproperties on duck-typed blob-like HTTP/1.1 request bodies are now coerced and validated, potentially rejecting previously accepted valuesFor 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.