Axios
Axios: ReDoS (O(N²)) in shouldBypassProxy host normalization, reachable via untrusted redirect Location
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.15.0, < 1.20.0
Fixed in 1.20.0
Mitigation
Upgrade axios to 1.20.0 or later.
References
- Vendor advisory github.com/axios/axios/security/advisories/GHS…
- Patch github.com/axios/axios/pull/11141
- Patch github.com/axios/axios/commit/d19040bda7a8be2f…
1 more
- Release notes github.com/axios/axios/releases/tag/v1.20.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.