Summary
Axios, a popular HTTP client for browsers and Node.js, contains a NO_PROXY bypass issue that allows traffic to be sent through a proxy even when local addresses should be excluded.
If an attacker can influence the target URL of an Axios request, they can use non-127.0.0.1 addresses in the 127.0.0.0/8 range to circumvent NO_PROXY protections and potentially reach internal services that were assumed to be shielded from proxied access.
Affected context
This vulnerability affects applications that:
- Use Axios versions prior to 1.15.1 or 0.31.1 in browser or Node.js environments, and
- Rely on NO_PROXY (or similar proxy-bypass configuration) to prevent certain hosts—especially local or internal addresses—from being accessed through an HTTP proxy, while
- Allowing some level of external influence over the URLs used in Axios requests (directly or indirectly from user input, configuration, or third-party data).
In these contexts, Axios's incomplete handling of the 127.0.0.0/8 loopback range can cause requests to be proxied even though they appear to be protected by NO_PROXY, weakening isolation guarantees around internal endpoints.
Exploit preconditions
- Attack surface: HTTP request logic built on Axios, especially generic HTTP helper functions, API clients, or SDKs that proxy outbound requests.
- Required access: Ability for an attacker to influence or control the URL or host portion of an Axios request (e.g., via request parameters, configuration fields, redirect targets, or indirectly via compromised upstream services).
- Trigger point: An Axios outbound request is made where NO_PROXY is expected to prevent local or internal traffic from passing through the configured proxy.
- Why exploitation is possible: The implementation treats parts of the 127.0.0.0/8 address space inconsistently with NO_PROXY expectations, allowing addresses such as 127.x.x.x (excluding 127.0.0.1) to be routed through the proxy, effectively bypassing intended protections and enabling access patterns akin to SSRF.
Why this happens
The underlying issue is an incomplete or incorrect interpretation of host and address matching when enforcing NO_PROXY logic for Axios requests.
Instead of robustly handling the entire 127.0.0.0/8 loopback range and consistently mapping local addresses to NO_PROXY rules, the implementation only reliably excludes 127.0.0.1 while allowing other 127.x.x.x addresses to be proxied. This misclassification stems from insufficient normalization and matching of hostnames and IP addresses (CWE-183: Inclusion of Functionality from Insecure or Untrusted Control Sphere) and weak enforcement of access control boundaries at the proxy layer (CWE-441: Unintended Proxy or Intermediary). As a result, an attacker controlling the request URL can pivot Axios into issuing proxied requests to addresses the application owner believed were exempt, enabling Server-Side Request Forgery behaviors (CWE-918).
Potential impact
- Requests intended to bypass the proxy may be routed through it, exposing internal or local endpoints to proxy-level attackers.
- Potential Server-Side Request Forgery (SSRF) against services bound to localhost or other internal interfaces reachable via the proxy.
- Enumeration of internal HTTP services or metadata endpoints that were assumed to be protected by NO_PROXY.
- Leakage of sensitive information returned by internal services through the proxy path to an attacker controlling or monitoring the proxy.
- Undermining of network segmentation assumptions and defense-in-depth designs that rely on strict proxy-bypass behavior for local addresses.
General mitigation guidance
Mitigation centers on making proxy-bypass logic explicit, conservative, and independent from subtle IP parsing behavior:
- Treat the entire 127.0.0.0/8 range as loopback and subject it to the strictest NO_PROXY or deny-list rules, not just 127.0.0.1.
- Introduce explicit allow-lists for outbound destinations at the application or infrastructure level; deny all internal CIDR ranges (e.g., 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) from being requested via Axios where user input influences URLs.
- Normalize and validate hostnames and IP addresses before issuing Axios requests, rejecting or stripping any user-controlled values that resolve to local or private networks.
- Separate network roles: run sensitive internal services on interfaces or networks that cannot be reached from proxy egress paths and do not rely solely on NO_PROXY for isolation.
- Apply the principle of least privilege to proxy configurations, giving them only the minimal network reach necessary for legitimate outbound traffic.
How teams detect issues like this
Detection typically involves a combination of code-level and configuration-level review:
- Static analysis and linters: Define rules that flag Axios usage where request URLs are composed from user input or untrusted data, especially when combined with proxy configurations or NO_PROXY reliance.
- Configuration audits: Inspect environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) and application-specific proxy settings to identify mismatches between intended and actual protected address ranges.
- Code review cues: Look for helper functions that wrap Axios (e.g.,
httpClient.get(url)or generic "fetch" utilities) and examine how they handle hosts, IPs, and NO_PROXY assumptions. Flag any code that assumes 127.0.0.1 is the only loopback address. - Network observability: Use proxy logs and network monitoring to detect unexpected proxied requests to 127.x.x.x or other internal ranges. Anomalous internal requests originating from Axios-based services may indicate exploitation.
- Automated security testing: Incorporate SSRF-focused tests into CI pipelines, attempting requests to various 127.x.x.x addresses through Axios-based clients to validate that proxy-bypass rules behave as expected.

