CVE-2026-101906: Axios: ReDoS (O(N²)) in shouldBypassProxy host normalization, reachable via untrusted redirect Location
Axios shouldBypassProxy() normalizes hostnames with hostname.replace(/\.+$/, ''). For a hostname shaped as many dots followed by a non-dot, the anchored regex can perform quadratic backtracking. Because axios re-evaluates proxy bypass rules for redirected requests, a malicious server can trigger this synchronous work through a crafted redirect Location.
The issue affects Node.js applications that use environment proxy variables with NO_PROXY and allow redirects.
shouldBypassProxy normalizes a host with hostname.replace(/.+$/, ‘’). On a host of the shape (e.g. “.” × 40000 + “a”), this anchored regex backtracks quadratically (O(N²)), synchronously starving the Node.js event loop. Because axios re-evaluates the proxy on every redirect using the new Location host, a malicious server can return a crafted 302 Location and freeze the client’s event loop for seconds per redirect — a denial of service.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-101906 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →