/

CVE-2026-42043

Severity:

HIGH RISK

(7.2)

Server-Side Request Forgery (SSRF) / Proxy Bypass

CVE-2026-42043

Modified

Vulnerability type

Category:

Server-Side Request Forgery (SSRF) / Proxy Bypass

CWE:

CWE-183, CWE-441, CWE-918

Impact:

Proxy Bypass leading to Potential SSRF and Internal Service Exposure

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/axios/axios/security/advisories/GHSA-pmwg-cvhr-8vh7
access.redhat.comaccess.redhat.com/errata/RHSA-2026:14937
access.redhat.comaccess.redhat.com/errata/RHSA-2026:16476
access.redhat.comaccess.redhat.com/errata/RHSA-2026:16532
access.redhat.comaccess.redhat.com/errata/RHSA-2026:16534
access.redhat.comaccess.redhat.com/errata/RHSA-2026:16535
access.redhat.comaccess.redhat.com/errata/RHSA-2026:16542
access.redhat.comaccess.redhat.com/errata/RHSA-2026:16874
access.redhat.comaccess.redhat.com/errata/RHSA-2026:17468
access.redhat.comaccess.redhat.com/errata/RHSA-2026:17474
access.redhat.comaccess.redhat.com/errata/RHSA-2026:17657
access.redhat.comaccess.redhat.com/errata/RHSA-2026:17699
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19109
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19375
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20889
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20938
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21017
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21338
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21772
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22465
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22619
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22629
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22840
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23361
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24536
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24539
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24853
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24977
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25041
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25089
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25271
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25273
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26214
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26225
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26232
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33574
access.redhat.comaccess.redhat.com/errata/RHSA-2026:36882
access.redhat.comaccess.redhat.com/errata/RHSA-2026:48670
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-42043
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2461626
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42043.json

Frequently asked

questions

Yes, in many architectures it can be. If a remote attacker can influence or control the URL used in Axios requests (for example, via parameters, redirect targets, or configuration options), they can attempt to bypass NO_PROXY and trigger proxied requests to local or internal addresses. If the URL cannot be influenced from outside, the exposure is reduced to internal or supply-chain actors.

It depends on how Axios is used. If the service exposes URL-influencing functionality only to authenticated users, then an attacker typically needs valid credentials or must compromise an authenticated context. In other cases, such as public-facing APIs that accept arbitrary URLs or redirect destinations, exploitation can be unauthenticated and purely remote.

The safest pattern is to decouple trust in NO_PROXY from critical security boundaries and enforce strict destination controls: treat the entire loopback and internal IP ranges as off-limits for any Axios requests that derive from user-controlled input, normalize and validate all target hosts and IPs before issuing requests, and enforce explicit allow-lists or deny-lists at both application and network layers. Combined with corrected NO_PROXY logic, this significantly reduces the risk of proxy bypass and SSRF.

Future prevention relies on defense in depth: normalize and validate URLs before making outbound requests, treat proxy and NO_PROXY configurations as best-effort performance or routing hints rather than hard security controls, and apply network-level egress filters that block access to local and private ranges from HTTP clients exposed to user input. Incorporating automated checks for SSRF patterns in code review and continuous integration pipelines can help surface similar classes of bugs before deployment.

Find out what's already
exploitable in your codebase.