Skip to content

fix(security): fix 20 security issues in axios, undici - #293

Open
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-212998684-qnux
Open

aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-212998684-qnux

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

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:

Issue Severity           Description
CVE-2025-62718
HIGH
[axios] NO_PROXY checks fail to normalize loopback hostnames such as "localhost." (trailing dot) and "[::1]" (IPv6 literal), so these requests are sent through the configured proxy. Attackers can exploit this to bypass proxy protections and reach loopback or internal services via SSRF.
CVE-2026-44492
HIGH
[axios] Axios is a promise based HTTP client for the browser and Node.js. Prior to 0.32.0 and 1.16.0, Axios does not normalise IPv4-mapped IPv6 addresses. When NO_PROXY lists an IPv4 address such as 127.0.0.1 or 169.254.169.254, a request URL using the IPv4-mapped IPv6 form (::ffff:7f00:1, ::ffff...
GHSA-g987-ghpm-49w8
HIGH
[axios] ## Summary

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_PROXY names the destination using an equivalent Unicode IDN or expanded IPv6 form. The Unicode IDN case affect...
GHSA-wwgw-vggh-5g74
HIGH
[axios] ## Summary

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...
GHSA-96x6-9jq2-jqcp
HIGH
[axios] ## Summary

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...
GHSA-hxh7-q3v4-r388
HIGH
[axios] ## Summary

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 ...
CVE-2026-40175
HIGH
[axios] Axios is a promise based HTTP client for the browser and Node.js. Versions prior to 1.15.0 and 0.3.1 are vulnerable to a specific gadget-style attack chain in which prototype pollution in a third-party dependency may be leveraged to inject unsanitized header values into outbound requests....
AIKIDO-2026-291630
HIGH
[axios] The Node.js HTTP adapter follows redirects through follow-redirects, which strips standard credential headers such as Authorization on cross-origin hops but leaves caller-defined secret headers like X-API-Key untouched. A server that responds with a cross-origin redirect can therefo...
CVE-2026-44496
HIGH
[axios] Axios is a promise based HTTP client for the browser and Node.js. Axios versions before 0.32.0 on the 0.x line and before 1.16.0 on the 1.x line build a regular expression from the configured XSRF cookie name without escaping regex metacharacters. In standard browser environments, an atta...
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-25639
MEDIUM
[axios] Axios is a promise based HTTP client for the browser and Node.js. Prior to versions 0.30.3 and 1.13.5, the mergeConfig function in axios crashes with a TypeError when processing configuration objects containing proto as an own property. An attacker can trigger this by providing a mali...
AIKIDO-2025-10185
MEDIUM
[axios] Server-side request forgery (SSRF) occurs because absolute URLs are accepted by default in buildFullPath(), letting attackers bypass URL restrictions and reach blocked endpoints. This also bypasses the prior CVE-2025-27152 fix.
GHSA-h3x3-jpp4-wjp8
MEDIUM
[axios] Axios's default Node.js HTTP/1 transport can exceed a configured maxBodyLength when request bodies are string streams with multi-byte UTF-8 content, because the redirect-capable wrapper counts UTF-16 code units instead of bytes. This allows an attacker-influenced request to send up to roughly three times the intended byte cap before rejection, causing excess bandwidth/quota consumption.
GHSA-mw39-9473-h7mr
MEDIUM
[axios] Axios method shortcuts (e.g., get()) recursively deep-copy plain-object params without a depth limit, so deeply nested input causes a synchronous stack-overflow RangeError before any promise is returned. A remote attacker can crash a Node.js service by sending a small nested JSON payload that is forwarded as params, since an uncaught exception terminates the process (denial of service).
AIKIDO-2026-38469
MEDIUM
[axios] Before adapter normalization, axios accepted malformed http: and https: URLs that omitted //, such as https: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...
CVE-2025-27152
MEDIUM
[axios] axios is a promise based HTTP client for the browser and node.js. The issue occurs when passing absolute URLs rather than protocol-relative URLs to axios. Even if ⁠baseURL is set, axios sends the request to the specified absolute URL, potentially causing SSRF and credential leakage. This ...
AIKIDO-2023-10001
LOW
[axios] Several security vulnerabilities were quietly patched in axios version 1.6.4 and version 0.29.0. Notably, a prototype pollution flaw impacted the formDataToJSON function, posing a significant risk. Additionally, a Regular Expression Denial of Service (ReDoS) vulnerability was identifi...
CVE-2026-139849
HIGH
[undici] undici is an HTTP client for Node.js. In versions 6.14.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0, EnvHttpProxyAgent picks a direct or proxied route for each request from the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables but applies the application's t...
CVE-2026-141996
HIGH
[undici] undici is an HTTP client for Node.js. In versions 6.8.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0, the redirect interceptor builds each follow-up request from the options of the previous one and, on a cross-origin redirect, kept the TLS servername of the first reques...
CVE-2026-144348
LOW
[undici] ProxyAgent mutates a shared headers object by writing proxy credentials into it, so any other agent reusing that object (including EnvHttpProxyAgent when HTTP_PROXY and HTTPS_PROXY differ) leaks those credentials to the wrong proxy operator. This exposes proxy credentials to unintended third parties.

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-node library which creates an axios instance via axios.create(options.axiosConfig) and makes POST requests using this.axiosInstance.post(\${this.host}${this.path}`, data, req)`.

  • The URL is constructed manually by concatenating this.host and this.path strings, not relying on axios's baseURL + url combination feature.

  • The breaking change about URL combining (version 1.8.0) does not apply since the code doesn't use both baseURL and url config 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() or setCookie() 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/core and analytics-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)

Version Description
1.0.0
Refactored Axios to use ES2017
1.0.0
Multiple deprecations, refactors and fixes (as noted in the Deprecated section stating these may impact projects)
1.2.0
Refactored module exports
1.8.0
Code relying on absolute URL handling will now combine URLs instead of preferring request URL when allowAbsoluteUrls config is added
1.16.0
Fetch adapter now enforces maxBodyLength and maxContentLength (previously silently ignored)
1.16.0
parseProtocol now strictly requires a colon in the protocol separator
1.16.0
Deprecated unescape() replaced with modern UTF-8 encoding
0.32.0
mergeConfig and header merging now return objects with a null prototype, requiring consumers to use Object.prototype.hasOwnProperty.call(obj, key)
0.32.0
AxiosError.toJSON() now redacts sensitive keys by default
1.18.0
validateStatus: undefined behavior changed (requires opt-in via transitional.validateStatusUndefinedResolves to treat as omitted)
1.20.0
HTTP Status Naming: Added ContentTooLarge (413) and UnprocessableContent (422), while retaining PayloadTooLarge and UnprocessableEntity as backward-compatible deprecated aliases.
1.20.0
Runtime Option Handling: Hardened behavioral configuration reads against shared and foreign prototype pollution and normalized unsafe interceptor replacement objects. This clarifies Fetch redirect and custom implementation behavior, HTTP/2 DNS and proxy handling, CIDR-based NO_PROXY matching, and malformed data URI rejection; see the PR for documented compatibility effects.
0.34.0
Header Types: TypeScript now rejects header values that are Promises, functions, or objects with custom toString() methods. Resolve promises, call functions, or explicitly convert objects before assigning header values.
0.34.0
Proxy Routing: NO_PROXY / no_proxy entries now support IPv4 and IPv6 CIDR ranges. Previously ineffective ranges now cause matching IP destinations to bypass the proxy; review existing ranges when upgrading.
0.34.0
Request Configuration: Prevent inherited properties from influencing form serializer options, default request methods, headers on interceptor-returned configs, and HTTP redirect hooks. Applications relying on inherited options must define those values as own properties.
1.21.0
Header Defaults: Only plain objects, null-prototype maps, and compatible AxiosHeaders instances are treated as common or method-specific defaults; literal headers such as Link are now preserved. Applications using custom class instances as defaults must convert them to plain maps or compatible AxiosHeaders. Otherwise, those instances become literal header values, including on requests using other methods.
1.21.0
Runtime Consistency: Circular parameters now reject with ERR_BAD_OPTION_VALUE, and sparse or non-index numeric form fields serialize as keyed objects. With proxy: false, native proxyEnv agents using unsupported pool-management or TLS-session lifecycle overrides now reject with ERR_BAD_OPTION_VALUE; construct those agents without proxyEnv.

All breaking changes by upgrading undici from version 6.24.1 to 6.29.2 (CHANGELOG)

Version Description
6.27.0
WebSocket fragment count limit enforced: applications using WebSocket against untrusted endpoints may experience rejected connections or messages that previously succeeded but contained excessive fragment counts (CVE-2026-12151)
6.27.0
Set-Cookie percent-decoding removed: parseSetCookie no 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)
6.27.0
SameSite attribute parsing strictness: cookie parser now requires exact matches for SameSite values (Strict, Lax, None), rejecting previously accepted substring matches like SameSite=NoneOfYourBusiness (CVE-2026-11525)
6.28.0
Retry interceptor rejects inconsistent Content-Length: partial responses with Content-Length inconsistent with Content-Range are now rejected, which may cause requests that previously succeeded to fail (GHSA-8xcm-r25x-g524)
6.28.0
Cookie domain, path, and unparsed attribute validation: 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-event

This PR fixes the vulnerable axios (0.27.2) and undici (6.24.1) packages. Both are transitive dependencies. The changes are in shared-actions/send-deployment-event/package.json, which gets a new resolutions entry, and in yarn.lock.

axios

axios comes in only through analytics-node@6.2.0, which declares axios@^0.27.2. That is the latest analytics-node release, so no parent bump can reach a patched axios. A resolutions entry pins axios to 1.21.0, the lowest version that meets every fix floor. An earlier pin of 1.18.0 left several GHSA advisories open, which is why the final pin is 1.21.0. This moves analytics-node across 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-env and others).

undici

undici comes in through @actions/http-client@4.0.0, which declares undici@^6.23.0. That range already allows the patched 6.29.2, so only yarn.lock changed. 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-age to reach 6.29.2.

Version changes

Package From To Why updated
axios 0.27.2 1.21.0 Direct CVE fix, forced by a resolutions pin because analytics-node caps it at ^0.27.2
undici 6.24.1 6.29.2 Lockfile refresh within the @actions/http-client range ^6.23.0
follow-redirects 1.15.11 1.16.3 Transitive, required by the new axios
form-data 4.0.5 4.0.6 Transitive, required by the new axios
hasown 2.0.2 2.0.4 (added alongside 2.0.2) Transitive, required by the new form-data
https-proxy-agent not present 5.0.1 New transitive dependency of the new axios
agent-base not present 6.0.2 New transitive dependency, via https-proxy-agent
debug not present 4.4.3 New transitive dependency, via https-proxy-agent
proxy-from-env not present 2.1.0 New transitive dependency of the new axios

Docs

  • Yes! ✋ I have updated the documentation.

For contributions to the Typeform/.github repo

Note: 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.

  • This PR only changes an existing workflow.
  • This PR adds a new workflow that is needed in a public Typeform repository.

@pr-auditor

pr-auditor Bot commented Dec 6, 2026

Copy link
Copy Markdown

✅ Security Analysis Results

No security issues found. 2 files reviewed.


@pr-auditor rescan to re-run · Powered by Claude Sonnet 5.5 · Docs · #security-engineering-team

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.

0 participants