CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-54729

CVE-2026-54729: SSRF Protection Bypass in dssrf-js via NXDOMAIN Resolution Discrepancy

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 31, 2026·6 min read·41 visits

Executive Summary (TL;DR)

The dssrf-js library fails to detect local/internal domains if upstream DNS servers return NXDOMAIN, allowing attackers to perform unauthenticated Server-Side Request Forgery (SSRF) to loopback endpoints.

CVE-2026-54729 is a critical Server-Side Request Forgery (SSRF) bypass vulnerability in the dssrf-js Node.js library prior to version 1.0.5. The flaw occurs because the library's DNS validation mechanism incorrectly treats domains like 'localhost' as safe when the configured upstream DNS resolver returns NXDOMAIN. Since the system's HTTP client later falls back to OS-level resolution (resolving 'localhost' to '127.0.0.1'), attackers can bypass validation and access internal loopback addresses.

Vulnerability Overview

dssrf-js is a Node.js-based utility library designed to prevent Server-Side Request Forgery (SSRF) by validating URLs before they are processed by outbound HTTP clients. In modern cloud and microservices architectures, web applications frequently make outward network requests to fetch remote resources, call third-party APIs, or process user-supplied webhooks. If these outbound requests are not strictly verified, attackers can manipulate the request parameters to force the server to connect to internal services, local databases, or administrative interfaces.\n\nValidation libraries like dssrf-js act as gatekeepers, analyzing target hostnames and IPs to ensure they resolve exclusively to public, non-private destinations. This vulnerability exposes a critical security bypass where the validation mechanism fails to recognize local domain names, creating a vector for unauthorized internal network access. Applications relying on vulnerable versions of this library are subject to full SSRF bypass if the host environment queries public DNS servers.

Root Cause Analysis

The root cause of this vulnerability lies in a fundamental discrepancy between two distinct DNS resolution mechanisms provided by Node.js. The vulnerable versions of dssrf-js used network-level APIs like dns.resolve4() to resolve target domain names. Unlike standard lookup operations, these APIs bypass the operating system's local resolver configurations, such as the /etc/hosts file or local DNS caches, and query the system's configured upstream DNS servers directly. If the application environment is configured to use a public external resolver like Cloudflare's 1.1.1.1, querying a domain such as localhost returns an NXDOMAIN error because the domain does not exist in the public DNS namespace.\n\nThe library wrapped these resolution queries in .catch(() => []) blocks, which swallowed the NXDOMAIN error and returned an empty array of IP addresses. Since the array of resolved IPs was empty, the safety checks in dssrf-js concluded that the host did not resolve to any internal or loopback IP addresses, classifying the domain as safe.\n\nWhen the host application subsequently executed the actual HTTP request using an HTTP client like axios or Node's internal http module, the client performed an OS-level name lookup (equivalent to dns.lookup()). This lookup respected local configurations and successfully resolved localhost to 127.0.0.1 or ::1, completing the connection to the internal service and bypassing the safety validation.

Vulnerable vs. Patched Code Analysis

In vulnerable versions of dssrf-js, DNS resolution was handled by sequential, direct network-level resolution calls that did not evaluate system-level files. The following code snippet shows the flawed implementation in helper functions:\n\ntypescript\n// Vulnerable implementation in dssrf-js < 1.0.5\nasync function resolve_all_records(host: string) {\n const A = await dns.resolve4(host).catch(() => []);\n const AAAA = await dns.resolve6(host).catch(() => []);\n const CNAME = await dns.resolveCname(host).catch(() => []);\n\n return {\n A,\n AAAA,\n CNAME\n };\n}\n\n\nThe patched version resolves the issue by executing DNS resolution concurrently and adding a fallback mechanism to trigger dns.lookup() when direct network resolution fails to return any IP records. The patched implementation is shown below:\n\ntypescript\n// Patched implementation in dssrf-js 1.0.5\nasync function resolve_all_records(host: string) {\n const [A, AAAA, CNAME] = await Promise.all([\n dns.resolve4(host).catch(() => [] as string[]),\n dns.resolve6(host).catch(() => [] as string[]),\n dns.resolveCname(host).catch(() => [] as string[])\n ]);\n\n if (A.length === 0 && AAAA.length === 0) {\n try {\n // Fallback to local OS-level resolution to capture localhost or /etc/hosts entries\n const lookups = await dns.lookup(host, { all: true });\n for (const entry of lookups) {\n if (entry.family === 4) A.push(entry.address);\n if (entry.family === 6) AAAA.push(entry.address);\n }\n } catch {}\n }\n\n return { A, AAAA, CNAME };\n}\n\n\nWhile this fallback correctly captures OS-configured domains, the error handling within the fallback is wrapped in an empty catch block. If the local system's dns.lookup() fails or times out due to resource constraints, the library will still return empty arrays, which could lead to validation bypasses in unstable host environments.

Exploitation & Attack Methodology

To exploit this vulnerability, an attacker must identify an application endpoint that validates URLs using dssrf-js prior to version 1.0.5 and then performs a network request to the validated URL. The attack is highly reliable in environments where the host container or server utilizes an external DNS server such as 1.1.1.1 or 8.8.8.8 for network resolution. The attacker passes a URL targeting internal administration endpoints or databases binding to loopback addresses.\n\nmermaid\ngraph LR\n A["Attacker Payload: http://localhost:8080/admin"] --> B["Node.js Application Host"]\n B --> C["dssrf-js is_url_safe('localhost')"]\n C --> D["dns.resolve4('localhost') queries 1.1.1.1"]\n D --> E["1.1.1.1 returns NXDOMAIN"]\n E --> F["dssrf-js swallows error, returns safe (true)"]\n F --> G["HTTP Client connects to http://localhost:8080/admin"]\n G --> H["OS-level dns.lookup() resolves to 127.0.0.1"]\n H --> I["Request executed on Local Admin Port"]\n\n\nBecause no credentials or specialized payloads are required, the exploit can be initiated with a single unauthenticated HTTP request containing the target URL. The host application validates the domain, receives a positive safety result, and initiates the internal connection, granting the attacker unauthenticated access to internal loopback resources.

Residual Risks & Architectural Limitations

Despite the fallback implementation in version 1.0.5, applications relying on validation-based libraries like dssrf-js remain vulnerable to structural attack techniques. The most prominent risk is DNS Rebinding, which exploits the Time-of-Check to Time-of-Use (TOCTOU) gap. During validation, the library resolves the hostname and checks the IP. Once validated, the host application's HTTP client must resolve the hostname a second time to establish the TCP connection.\n\nAn attacker can set up a custom DNS server with a low Time-To-Live (TTL) of 0 seconds. During the validation phase, the server returns a benign public IP address. Immediately after, when the HTTP client performs its DNS resolution to connect, the server returns an internal IP address (such as 127.0.0.1 or the AWS metadata endpoint 169.254.169.254). This completely bypasses the static validation logic.\n\nFurthermore, custom URL parsing inside validation libraries introduces potential parsing discrepancies. If the parser used by the validation library handles special characters, userinfo credentials, or port formatting differently than the downstream HTTP client (such as Axios, Fetch, or Request), attackers can construct obfuscated URLs that bypass validation filters but are interpreted as internal targets by the client. Relying on application-level validation without locking the resolved IP address is an inherently weak design pattern.

Remediation and Mitigation

The primary remediation strategy is upgrading the dssrf-js dependency to version 1.0.5 or higher. This incorporates the OS-level lookup fallback, resolving the hostname mismatch. Organizations can execute npm install dssrf-js@1.0.5 to apply the patch.\n\nTo achieve defense-in-depth, security teams must implement network-level controls. Relying entirely on application-layer software libraries to stop SSRF is a risky strategy. By configuring outbound firewalls, security groups, or egress rules, organizations can prevent application servers from establishing outbound TCP connections to localhost, private IP subnets (RFC 1918), and local cloud metadata endpoints (e.g., 169.254.169.254).\n\nUtilizing a dedicated forward proxy designed to intercept and filter outbound requests represents the most robust long-term architectural pattern. Outbound proxies enforce safety boundaries independently of application code parsing discrepancies or lookup fallbacks.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.7/ 10
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

Affected Systems

dssrf-js (Node.js library)

Affected Versions Detail

Product
Affected Versions
Fixed Version
dssrf-js
HackingRepo
< 1.0.51.0.5
AttributeDetail
CWE IDCWE-918
Attack VectorNetwork (AV:N)
CVSS Score8.7 (High)
Exploit StatusPoC
ImpactIntegrity (High)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1005Data from Local System
Collection
CWE-918
Server-Side Request Forgery (SSRF)

The web application receives a URL or similar parameter from an upstream client and sends a request to this URL without properly ensuring that the destination is secure or external.

Known Exploits & Detection

GitHub Security AdvisoryOfficial GHSA describing the bypass and implementation details

Vulnerability Timeline

Vulnerability remediated in code repository via fallback lookup patch
2026-06-09
GitHub Security Advisory GHSA-5846-7qm3-r52j published
2026-07-31
CVE-2026-54729 officially registered and published
2026-07-31

References & Sources

  • [1]GitHub Security Advisory GHSA-5846-7qm3-r52j
  • [2]Fix Commit 668c21792cd1252baf779a176aa652e2b4c0067d
  • [3]CVE-2026-54729 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•35 minutes ago•GHSA-W2CH-4XGR-22WW
5.3

GHSA-W2CH-4XGR-22WW: Missing Authorization in Vikunja Task Relation Deletion

An authorization bypass vulnerability in Vikunja versions prior to v2.6.0 permits authenticated users to delete relationships between tasks across project boundaries without requiring read or write authorization for the target related task.

Alon Barad
Alon Barad
1 views•5 min read
•about 2 hours ago•CVE-2026-108258
6.9

CVE-2026-108258: Path Traversal in Shiny for Python Bookmark Restoration

A path traversal vulnerability in Shiny for Python (posit-dev/py-shiny) versions 1.4.0 through 1.6.3 allows unauthenticated remote attackers to read arbitrary files and traverse directories via crafted _state_id_ query parameters.

Alon Barad
Alon Barad
1 views•4 min read
•about 3 hours ago•CVE-2026-108260
7.6

CVE-2026-108260: Stored Cross-Site Scripting (XSS) in @tinacms/web-components

A Stored Cross-Site Scripting vulnerability in @tinacms/web-components prior to version 0.2.1 allows low-privileged content authors to execute arbitrary JavaScript code in the context of website visitors via unsanitized URL attributes in custom Markdown rendering components.

Alon Barad
Alon Barad
3 views•5 min read
•about 4 hours ago•CVE-2026-108261
9.3

CVE-2026-108261: Admin Preview Cross-Origin Bypass and GraphQL Hijacking in TinaCMS

A critical origin validation flaw in TinaCMS admin preview allows unauthenticated attackers to bypass cross-origin postMessage checks and execute unauthorized GraphQL queries and mutations under an authenticated editor's context.

Alon Barad
Alon Barad
5 views•5 min read
•about 4 hours ago•CVE-2026-108259
8.2

CVE-2026-108259: Code Injection in @tinacms/cli via Unsanitized Git Branch Name Interpolation

@tinacms/cli prior to version 3.0.0 dynamically constructs client source files using string interpolation without properly sanitizing runtime configuration variables. An attacker with permissions to create a branch or pull request can inject arbitrary JavaScript statements via a crafted Git ref name, leading to execution during automated build processes.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 6 hours ago•CVE-2026-107804
5.3

CVE-2026-107804: Client IP Resolution Flaw & Authentication Lockout in Nginx UI

Nginx UI versions 2.2.0 through 2.5.10 fail to properly configure Gin framework trusted proxies when deployed behind a reverse proxy. This causes all incoming HTTP requests to be attributed to the loopback IP (127.0.0.1), enabling IP allowlist bypass and global authentication lockouts.

Amit Schendel
Amit Schendel
6 views•5 min read