Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSubmit crafted localhost URL to application
-
DeliveryApplication calls is_url_safe() in dssrf
-
ExploitExternal DNS (1.1.1.1) returns NXDOMAIN for localhost
-
InstallNo dns.lookup fallback invoked
-
C2dssrf returns safe=true
-
ExecuteApplication fetches internal URL
-
ImpactAttacker receives internal service response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two specific conditions to both be true simultaneously. First, the target Node.js application must have dns.setServers() configured with an external public DNS resolver (such as Cloudflare 1.1.1.1 or Google 8.8.8.8) that returns NXDOMAIN for 'localhost' - this is not the Node.js default behavior, which inherits the OS resolver from /etc/resolv.conf. Second, the application must use dssrf version <= 1.0.4 as its SSRF validation layer and must pass attacker-controlled URLs to is_url_safe() before making outbound HTTP requests. What limits exploitation: applications that use the default OS resolver (which resolves 'localhost' to 127.0.0.1) are not vulnerable. Applications that enforce network-level egress controls blocking loopback are not exploitable even if the application-layer check is bypassed. No authentication bypass is required at the dssrf library level - whether the attacker needs to authenticate to submit a URL depends entirely on the consuming application's own access controls, which are outside the scope of this CVE. |
| Impact | Real-world risk is moderate-to-high for applications that rely on dssrf as their primary SSRF defense mechanism. The attack is straightforward: any URL containing 'localhost' or similarly unresolvable-by-external-DNS hostnames bypasses the check entirely. The critical environmental precondition - use of an external DNS resolver like 1.1.1.1 - is plausible in containerized or cloud environments where operators explicitly configure Cloudflare or Google DNS for consistency or performance. CVSS is not officially scored, so risk must be inferred from CWE-918 and the POC. The scope impact is significant because exploitation means the consuming application will issue HTTP requests to its own loopback interface or internal network, potentially exposing administrative endpoints, metadata services (e.g., 169.254.169.254), or other internal services. The library is specifically a security control, so failure of the control directly negates the intended defense posture. Exploitation is not listed in CISA KEV, and the GHSA advisory does not report in-the-wild exploitation. The low-prevalence of the dssrf package itself limits the blast radius, but any application that deployed dssrf as its sole SSRF mitigation is fully exposed on the DNS-misconfiguration vector. No EPSS data is available. Attack complexity is elevated by the requirement for an external DNS resolver to be active - this is not a default Node.js configuration. |
| Exploit ScenarioDerived | An attacker submits the URL 'http://localhost/admin' to a Node.js web application that uses dssrf's is_url_safe() to validate user-supplied fetch targets before making outbound requests. Because the application's Node.js runtime is configured with dns.setServers(['1.1.1.1']), the dssrf library calls dns.resolve4('localhost'), which returns NXDOMAIN; with no fallback to dns.lookup(), the library returns true (safe), and the application proceeds to fetch http://localhost/admin, returning the internal admin page's response to the attacker. A working proof-of-concept demonstrating this bypass is included in the GitHub advisory GHSA-5846-7qm3-r52j. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 31, 2026
Server-side request forgery bypass in the dssrf npm SSRF-protection library (versions <= 1.0.4) allows internal resource access when Node.js is configured with an external DNS resolver such as 1.1.1.1. The is_url_safe() function relies solely on dns.resolve4 and dns.resolve6 to check whether a hostname resolves to an internal IP; when an external resolver returns NXDOMAIN for 'localhost' (which it cannot authoritatively answer), no addresses are returned and no fallback to dns.lookup occurs, causing the library to incorrectly classify localhost as safe. publicly available exploit code exists, demonstrated via a published proof-of-concept in the GitHub advisory GHSA-5846-7qm3-r52j.
RemediationAI
Upgrade dssrf to version 1.0.5 or later, which introduces a dns.lookup() fallback for hostnames that return no records from dns.resolve4 and dns.resolve6; this ensures OS-level resolution (including /etc/hosts entries for 'localhost') is always consulted. The fix is available via PR #102 (https://github.com/HackingRepo/dssrf-js/pull/102) and commit 668c21792cd1252baf779a176aa652e2b4c0067d. If an immediate upgrade is not feasible, a targeted compensating control is to avoid configuring Node.js with external-only DNS resolvers (i.e., do not call dns.setServers() with only public resolvers like 1.1.1.1 or 8.8.8.8); ensuring the OS default resolver or a resolver that handles 'localhost' is always available will prevent the NXDOMAIN bypass. An additional defense-in-depth measure is to implement network-layer egress filtering that blocks outbound HTTP connections to loopback (127.0.0.0/8), link-local (169.254.0.0/16), and RFC-1918 ranges at the firewall or container network policy level, independent of application-layer checks. This compensating control has the trade-off of requiring infrastructure changes and may break legitimate internal service communication if not scoped carefully.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
dssrf (pkg:npm/dssrf) is a Node.js library explicitly designed to prevent SSRF by validating URLs before an application makes outbound HTTP requests. Its is_url_safe() helper calls dns.resolve4() and dns.resolve6() to resolve hostnames and then checks resulting IPs against an internal-address blocklist (via is_ip_internal). The flaw is in the DNS resolution path: when Node.js is configured to use an external recursive resolver such as Cloudflare's 1.1.1.1 (via dns.setServers()), that resolver returns NXDOMAIN for 'localhost' because it has no authoritative record for it. The library interprets the empty result as 'no internal address found' and marks the URL as safe, completely bypassing the SSRF guard. The missing control is a fallback to dns.lookup(), which consults the OS-level resolver and /etc/hosts, where 'localhost' always resolves to 127.0.0.1. CWE-918 (Server-Side Request Forgery) precisely describes this root cause: a security control that is supposed to validate server-initiated HTTP requests fails to do so due to an incomplete hostname-resolution mechanism. The patch (commit 668c21792cd1252baf779a176aa652e2b4c0067d, PR #102) adds a dns.lookup({ all: true }) fallback invoked only when both dns.resolve4 and dns.resolve6 return empty arrays, closing the gap.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
AC:H because exploitation requires external DNS (e.g., 1.1.1.1) configured in Node.js; S:C and C:H because internal service access crosses trust boundary.
Primary rating from Vendor (https://github.com/HackingRepo/dssrf-js).
CVSS VectorVendor: https://github.com/HackingRepo/dssrf-js
DescriptionCVE.org
Summary
is_url_safe can treat localhost as safe when DNS resolver 1.1.1.1 returns NXDOMAIN because dns.resolve4 yields no address and no dns.lookup fallback occurs, allowing server-side request forgery.
POC
Example to simulate 1.1.1.1 in version before 1.5.0 of dssrf:
import { is_url_safe } from '../dist/helpers.js';
import dns from 'dns';
dns.setServers(['1.1.1.1']);
const TARGET = 'http://localhost/admin';
console.log(`Testing: ${TARGET}`);
console.log(`Current DNS Servers: ${dns.getServers()}`);
const result = await is_url_safe(TARGET);
if (result === true) {
console.log('dssrf treated localhost as SAFE because 1.1.1.1 returned NXDOMAIN.');
} else {
console.log('dssrf blocked localhost.');
}Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
The dssrf npm SSRF-protection library (versions 1.0.4 and earlier) contains a high-severity SSRF bypass vulnerability. With publicly available exploit code, attackers can circumvent the library's protection and access internal resources when external DNS resolvers are configured, exposing internal services and sensitive data.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
EUVD-2026-51574
GHSA-5846-7qm3-r52j
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB