CVE-2026-42038: Axios No_proxy Bypass Vulnerability
MODERATECVE-2026-42038 is a MODERATE (CVSS 6.8) no_proxy bypass vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Axios libraries in the npm ecosystem. The issue involves no_proxy bypass via ip alias allows ssrf. Remediation is available by upgrading affected packages to version 1.15.1, 0.31.1.
CVE-2026-42038 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2026-42038
To remediate this vulnerability, upgrade all affected Axios dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install axios@1.15.1
npm install axios@0.31.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls axios
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-42038, inspect your project dependencies using npm:
npm ls axios
Analyze the terminal output to locate any version of Axios in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.1), your application is affected.
Note: The npm ls axios command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Axios, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-42038 Affected Axios Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-42038?
Which Axios versions are affected?
What version fixes CVE-2026-42038?
Is axios affected?
What is the CVSS score of CVE-2026-42038?
What CWE is associated with CVE-2026-42038?
How can I check npm dependencies for CVE-2026-42038?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m7pr-hjqh-92cm",
"modified" : "2026-05-05T00:40:17Z",
"published" : "2026-05-05T00:40:17Z",
"aliases" : [ "CVE-2026-42038" ],
"summary" : "Axios: no_proxy bypass via IP alias allows SSRF",
"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.\n\nThe shouldBypassProxy() function does pure string matching ā it does not \nresolve IP aliases or loopback equivalents. As a result:\n- no_proxy=localhost does NOT block 127.0.0.1 or [::1]\n- no_proxy=127.0.0.1 does NOT block localhost or [::1]\n\n\nPOC :\nprocess.env.no_proxy = 'localhost';\nprocess.env.http_proxy = 'http://attacker-proxy:8888';\n\n```(base) srisowmyanemani@Srisowmyas-MacBook-Pro axios % >.... \n process.env.http_proxy = 'http://127.0.0.1:8888';\n\n console.log('=== Test 1: localhost (should bypass proxy) ===');\n try {\n await axios.get('http://localhost:7777/');\n } catch(e) {\n console.log('Error:', e.message);\n }\n\n console.log('');\n console.log('=== Test 2: 127.0.0.1 (should ALSO bypass proxy but DOES NOT) ===');\n try {\n await axios.get('http://127.0.0.1:7777/');\n } catch(e) {\n console.log('Error:', e.message);\n }\n\n fakeProxy.close();\n internalServer.close();\n });\n});\nEOF\n=== Test 1: localhost (should bypass proxy) ===\nā
Internal server hit directly (correct)\n\n=== Test 2: 127.0.0.1 (should ALSO bypass proxy but DOES NOT) ===\nšØ PROXY RECEIVED REQUEST TO: http://127.0.0.1:7777/\nšØ Host header: 127.0.0.1:7777. ```\n \n\n\n\n\n\n<img width=\"1212\" height=\"247\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0b07ddc4-507d-4b11-a630-15b94ad2c7e7\" />\n\n\n\n\nImpact: 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.\n\nFix: shouldBypassProxy() should resolve loopback aliases ā localhost, 127.0.0.1, and ::1 should all be treated as equivalent.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "axios"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.15.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "axios"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.31.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.31.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/axios/axios/security/advisories/GHSA-m7pr-hjqh-92cm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42038"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/axios/axios"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-05T00:40:17Z",
"nvd_published_at" : "2026-04-24T18:16:30Z"
}
}