Axios Flaws Let Attackers Bypass Proxy Controls and Trigger SSRF Attacks
Axios disclosed seven high-severity flaws, including HTTP/2 SSRF proxy bypass; attackers could reach internal services and cloud metadata; patched in 1.20.0.
Redirect-policy bypass in Axios fetch adapter
In Axios 1.17.0 through versions before 1.20.0, the fetch adapter ignores a maxRedirects: 0 policy and lets the underlying fetch implementation follow redirects. An application that expected the redirect response to be returned unchanged can instead have the follow-up request reach internal responses or state-changing internal endpoints. Impact is on the systems reached after the redirect (high subsequent confidentiality and integrity in the CVSS 4.0 score), not on Axios itself; the issue is tracked as CWE-441 and CWE-601. Browser and Node.js consumers of those Axios versions that use the fetch adapter with redirects disabled are affected. No public proof-of-concept is known, the flaw is not in CISA KEV, and it is fixed in Axios 1.20.0.
What to do: Upgrade Axios to 1.20.0 or later in every application that uses the fetch adapter. Until that is deployed, do not rely on maxRedirects: 0 to stop redirects, and review server-side Axios calls to user-influenced URLs for possible access to internal or state-changing endpoints. Confirm the resolved version in lockfiles, not only the range declared in package.json.
| Product | Affected |
|---|---|
| axios | 1.17.0 up to, but not including, 1.20.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Axios is a promise-based HTTP client for the browser and Node.js. From 1.17.0 until 1.20.0, the fetch adapter bypasses the maxRedirects: 0 redirect policy. An Axios request uses the fetch adapter with maxRedirects set to zero and receives a redirect response. The underlying fetch implementation follows the redirect instead of returning the redirect response unchanged. The redirected request can access internal responses or reach state-changing internal endpoints despite redirects being disabled. This issue is fixed in version 1.20.0.
Axios disclosed seven high-severity flaws, including HTTP/2 SSRF proxy bypass; attackers could reach internal services and cloud metadata; patched in 1.20.0.
Today 1.3K readers · 1.9K views · 362 reads · all time 300K views