AI analysis
Axios 1.15.0 through versions before 1.20.0 has a regular-expression denial-of-service flaw in shouldBypassProxy. If HTTP_PROXY or HTTPS_PROXY is set, NO_PROXY or no_proxy is non-empty, and redirects are followed, a crafted redirect Location hostname made of many dots followed by a non-dot character makes a trailing-dot replace backtrack quadratically. That synchronous regex work can block the Node.js event loop and deny service; it does not expose data or allow code execution. Node.js and browser applications that ship those Axios releases and use a proxy together with a NO_PROXY list are the ones at risk. No public proof of concept is known, and the issue is not in CISA KEV; it is fixed in 1.20.0.
What to do: Upgrade Axios to 1.20.0 or later. Until you can upgrade, avoid following redirects on clients that run with HTTP_PROXY or HTTPS_PROXY and a non-empty NO_PROXY/no_proxy, and watch Node.js processes for event-loop stalls after outbound redirects.
Affected
| Axios | 1.15.0 up to, but not including, 1.20.0 |
Estimated exposure
massmillions of applications depend on Axios; the vulnerable 1.15.0–pre-1.20.0 slice is a smaller but still very large subset (order of hundreds of thousands to… — Axios is one of the most widely used JavaScript HTTP clients, with a very large npm download and dependent-project footprint, so the 1.15.0–pre-1.20.0 slice is plausibly present in a huge number of Node.js services and browser bundles;…
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description
Axios is a promise-based HTTP client for the browser and Node.js. From 1.15.0 until 1.20.0, Axios shouldBypassProxy applies a quadratic trailing-dot regular expression to redirect hostnames. HTTP_PROXY or HTTPS_PROXY is configured, NO_PROXY or no_proxy is non-empty, redirects are followed, and a crafted redirect Location contains many dots followed by a non-dot character. Hostname.replace(/.+$/, '') backtracks quadratically while processing the crafted redirect hostname. Synchronous regular-expression processing can block the Node.js event loop and cause denial of service. This issue is fixed in version 1.20.0.