fix(security): fix security issue in axios via minor version upgrade from 1.13.4 to 1.21.0 #175
Review confidence threshold not met — re-review recommended
Residual risk 0.68 = Change Risk (0.75) × (1 − Review Confidence (0.10)).
Flagged for follow-up review before production rollout.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 2% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"LGTM"
rubber_stamp
weight: 0
github-actions[bot]
<!-- For fixing bugs use https://github.com/Typeform/js-api-client/compare/?template=bugs.md -->
<!-- For pull requesting new features, improvements and changes use https://github.com/Typeform/js-api-client/compare/?template=features.md -->
---
Summary / Description
Upgrade axios to fix critical security vulnerabilities including proxy bypass/SSRF, prototype pollution MITM attacks, header injection, credential leakage on redirects, and HTTPS proxy cleartext exposure.
Security Impact — CVE vulnerabilities fixed by this PR
<details>
<summary>✅ 11 CVEs resolved by this upgrade</summary>
<br>
This PR will resolve the following CVEs:
| Issue | Severity | Description |
| --- | --- | --- |
| <pre>CVE-2025-62718</pre> | <pre>HIGH</pre> | [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. |
| <pre>CVE-2026-44494</pre> | <pre>HIGH</pre> | [axios] Axios is a promise based HTTP client for the browser and Node.js. From 1.0.0 to before 1.16.0, the Axios library is vulnerable to a Prototype Pollution "Gadget" attack that allows any Object.prototype pollution in the application's dependency tree to be escalated into a full Man-in-the-Mi... |
| <pre>CVE-2026-40175</pre> | <pre>HIGH</pre> | [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. |
| <pre>AIKIDO-2026-291630</pre> | <pre>HIGH</pre> | [axios] The Node.js HTTP adapter follows redirects through
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... || <pre>AIKIDO-2026-10823</pre> | <pre>HIGH</pre> | [axios] The Node HTTP adapter could treat HTTPS origins like a forward HTTP proxy target, sending the full URL, headers, and request body to the proxy in cleartext instead of opening a CONNECT tunnel and running TLS directly to the server. An HTTP proxy on the path can observe request metadata an... |
| <pre>CVE-2026-44496</pre> | <pre>HIGH</pre> | [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... |
| <pre>CVE-2026-25639</pre> | <pre>MEDIUM</pre> | [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... |
| <pre>AIKIDO-2026-38469</pre> | <pre>MEDIUM</pre> | [axios] Before adapter normalization,
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... || <pre>AIKIDO-2026-10820</pre> | <pre>MEDIUM</pre> | [axios] The fetch-backed request path resolves the same size guard options as the HTTP adapter but previously skipped enforcing them, so responses and bodies could grow without the limits callers configured. The implementation now rejects oversized declared lengths, oversized outbound bodies when... |
| <pre>AIKIDO-2026-10822</pre> | <pre>LOW</pre> | [axios] A prototype pollution vulnerability in the
formDataToJSONhelper allows attackers to polluteObject.prototypethrough specially crafted multipart field names, potentially enabling remote code execution or other malicious actions. || <pre>AIKIDO-2026-10819</pre> | <pre>LOW</pre> | [axios] A regular expression vulnerability in browser cookie parsing allowed metacharacters in cookie names to cause incorrect matching or excessive CPU consumption. The vulnerability was fixed by switching to literal string comparison instead of regex-based matching. |
</details>
Breaking Changes & Upgrade Impact — prefer Warnings / Cautions / ⚠️ sections over implementation sections (upgrade risks, breaking changes, manual migration steps)
<details>
<summary>✅ Code not affected by breaking changes.</summary>
<br>
✅ No breaking changes from the axios upgrade affect this codebase.
Analysis performed:
1. Header Injection (CRLF): Searched for dynamic header construction with
\ror\ncharacters. The codebase only uses static header values (Content-Type: application/json,Accept: application/json) and theAuthorizationheader with bearer tokens. No user-controlled data is injected into headers that could contain CRLF characters.2. Fetch adapter
maxBodyLength/maxContentLength: Searched for these configuration options. The codebase does not configure or rely on these limits, so the enforcement change has no impact.3.
parseProtocolchanges: Searched for usage ofparseProtocol. This internal axios function is not used anywhere in the codebase.4. Deprecated
unescape()replacement: Searched forunescape()usage. The codebase does not use this function. URL encoding is handled byencodeURIComponent()inbuildUrlWithParams().5. Malformed URLs without
//: Searched for URL construction patterns. All URLs in the codebase are properly formed:- API base URL:
https://api.typeform.com(properly formatted)- Test URLs:
http://test.com,http://localhost,https://www.typeform.com/logo.png(all properly formatted)- The
buildUrlWithParams()function only appends query parameters to existing URLs and doesn't construct protocol-level URLs.The codebase uses axios in a straightforward manner with static headers and properly formatted URLs, making it unaffected by the breaking changes in this upgrade.
All breaking changes by upgrading axios from version 1.13.4 to 1.21.0 (CHANGELOG)
| Version | Description |
| --- | --- |
| <pre>1.15.0</pre> | Header Injection (CRLF): Headers with CR/LF now throw
"Invalid character in header content"instead of being accepted. || <pre>1.16.0</pre> | Fetch adapter now enforces
maxBodyLengthandmaxContentLengthlimits that were previously silently ignored. || <pre>1.16.0</pre> |
parseProtocolnow strictly requires a colon in the protocol separator; strings that loosely parsed as protocols before may no longer match. || <pre>1.16.0</pre> | Deprecated
unescape()replaced with modern UTF-8 encoding; non-ASCII URL handling may produce different output bytes for consumers depending on legacyunescape()quirks. || <pre>1.20.0</pre> | HTTP Status Naming: Added
ContentTooLarge(413) andUnprocessableContent(422), while retainingPayloadTooLargeandUnprocessableEntityas backward-compatible deprecated aliases. || <pre>1.21.0</pre> | Header Defaults: Only plain objects, null-prototype maps, and compatible
AxiosHeadersinstances are treated as common or method-specific defaults; custom class instances used as defaults must be converted to plain maps or compatibleAxiosHeaders, otherwise they become literal header values. || <pre>1.21.0</pre> | Runtime Consistency: With
proxy: false, nativeproxyEnvagents using unsupported pool-management or TLS-session lifecycle overrides now reject withERR_BAD_OPTION_VALUE; such agents must be constructed withoutproxyEnv. |</details>
Fix Details / Technical Implementation (detailed write-up of what was changed and why)
<details>
<summary>🤖 Remediation details</summary>
Bump
axiosto resolve multiple high- and medium-severity vulnerabilitiesShort summary
This PR remediates a set of high- and medium-severity vulnerabilities in the
axiosHTTP client library.axiosis declared as a direct runtime dependency in the rootpackage.json, and the fix updates both the declared semver range there and the resolved entry inyarn.lock.axios
axioswas pinned at1.13.4via the range^1.13.4in the rootpackage.json, a version affected by multiple vulnerabilities requiring a minimum fix version of1.18.0. Because1.18.0falls within the same semver major (^1.x), the fix raises the declared floor to^1.18.0inpackage.jsonand refreshesyarn.lock, which Yarn resolved to1.21.0— the latest release satisfying that range and clearing all reported advisories across the1.xline.Version changes
| Package | From | To | Why updated |
|---------|------|----|-------------|
|
axios|^1.13.4(resolved1.13.4) |^1.18.0(resolved1.21.0) | Direct CVE fix — raises semver floor to clear all reported vulnerabilities |</details>