Summary
Axios fails to normalize IPv4‑mapped IPv6 addresses when evaluating NO_PROXY rules, causing certain internal hosts to be accessed through a proxy instead of being excluded.
An attacker who can influence request URLs may leverage this behavior to reach internal services (such as metadata endpoints) via the configured proxy, bypassing expected network protections.
Affected context
This vulnerability arises in applications using Axios in Node.js or browser environments that:
- Rely on HTTP proxies for outbound traffic
- Use NO_PROXY (or related) settings to exclude internal IPv4 addresses such as 127.0.0.1 or 169.254.169.254
- Accept or construct request URLs that may contain IPv4-mapped IPv6 forms (for example, ::ffff:7f00:1 or ::ffff:a9fe:a9fe)
In such contexts, requests intended to be blocked or sent directly can instead be routed through the proxy to internal targets.
Exploit preconditions
- Attack surface: Outbound HTTP(S) requests issued via Axios, typically from server-side applications or services.
- Required access: Ability to influence or control the request URL or target host (for example, via user-supplied input, configuration, or API parameters).
- Trigger point: Axios evaluates the NO_PROXY environment/option against the literal host string, without normalizing IPv4-mapped IPv6 addresses before comparison.
- Why exploitation is possible: NO_PROXY entries usually list plain IPv4 addresses, while Node.js resolves IPv4-mapped IPv6 forms to the same internal hosts; the mismatch allows those internal hosts to be reached via the proxy, bypassing intended exclusions.
Why this happens
The core issue is the mismatch between how Axios compares hostnames against NO_PROXY and how the underlying runtime resolves those addresses.
IPv4-mapped IPv6 literals such as ::ffff:7f00:1 represent the same hosts as IPv4 addresses like 127.0.0.1, but Axios does not normalize or canonicalize these forms prior to policy checks.
This leads to CWE-918: Server-Side Request Forgery (SSRF), because input-controlled URLs can be crafted in an alternate address representation that slips past proxy exclusion logic and still reach internal services.
Potential impact
- Requests can reach internal-only services (for example, cloud metadata endpoints) through the configured proxy.
- Attackers could potentially exfiltrate sensitive configuration or credentials exposed via internal HTTP endpoints.
- Internal management or administration interfaces reachable only via local addresses may be probed or interacted with.
- Network and proxy policies that rely on NO_PROXY to protect specific hosts can be silently bypassed.
General mitigation guidance
Effective mitigation focuses on normalizing addresses and tightening trust boundaries around outbound HTTP requests:
- Introduce canonicalization of host addresses before applying NO_PROXY or allowlist checks, treating IPv4-mapped IPv6 and IPv4 forms equivalently.
- Apply strict allowlist-based egress rules in application code, rejecting requests to loopback, link-local, and metadata-related address ranges regardless of proxy configuration.
- Reduce reliance on environment-driven proxy settings for security boundaries; treat them as configuration hints rather than enforcement mechanisms.
- Segregate sensitive internal services and metadata endpoints from general HTTP egress paths, and ensure least-privilege network access for application components.
How teams detect issues like this
Detection typically combines code-level review and runtime monitoring:
- Perform static analysis or code review to identify Axios usage where request targets are directly influenced by user input or untrusted configuration.
- Look for patterns where NO_PROXY is treated as a primary control for blocking access to internal IP ranges without additional validation.
- Use security tests or fuzzing to generate requests using alternative address notations (such as IPv4-mapped IPv6) and observe whether they bypass proxy exclusions.
- Employ outbound traffic monitoring to flag requests to loopback, link-local, or metadata-related addresses originating from application services.

