Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconRegister attacker-owned domain with short TTL
-
DeliverySubmit attacker domain URL to getLinkPreview() on target server
-
ExploitMalicious DNS returns public IP during resolveDNSHost validation
-
InstallValidation passes; library fetches original hostname string
-
C2DNS rebinds to internal/loopback address on second resolution
-
ExecuteServer-side fetch reaches internal HTTP resource
-
ImpactResponse content exfiltrated to attacker
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 | The vulnerability requires that: (1) the target application runs link-preview-js in a server-side Node.js context with a version prior to 4.0.4; (2) the application accepts user-supplied URLs and passes them to getLinkPreview() using the resolveDNSHost callback as its SSRF mitigation; and (3) the attacker controls a DNS server authoritative for a domain they own, capable of returning different IP addresses across successive resolution queries within a short TTL window. Exploitation is limited by the DNS TTL race window - aggressive DNS caching at the OS or resolver level may close or narrow this window, making exploitation less reliable. Deployments with network-layer egress controls blocking RFC 1918, loopback, and link-local ranges cannot be exploited even if the DNS rebinding succeeds at the application layer. No authentication is required against the library itself (CVSS PR:N), but the attacker must have their own DNS infrastructure - this is achievable with free domain registrars and custom NS records but is not a zero-effort prerequisite. |
| Impact | The vendor-assigned CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, score 7.5) rates attack complexity as Low, which overstates ease of exploitation: successful DNS rebinding requires the attacker to operate a DNS server authoritative for a domain they control, configure very short TTLs, and time the race between the library's validation and fetch phases. This is achievable but not trivially automated, suggesting AC:H is more accurate (assessed vector below reflects this). No EPSS score was included in the provided data, and this CVE does not appear in the CISA KEV catalog at time of analysis, supporting the view that exploitation is not yet widespread. The High confidentiality impact (C:H) is realistic: a successful bypass could expose internal HTTP services including cloud metadata endpoints (e.g., 169.254.169.254), internal APIs, or intranet resources. Deployments protected by egress firewall rules blocking RFC 1918 and loopback ranges at the network layer are effectively not exploitable regardless of this code flaw, making that network control a strong compensating measure. The same validation-to-fetch mismatch affects redirect handling, potentially widening the exploitable surface beyond direct hostname attacks. |
| Exploit ScenarioDerived | An attacker registers a domain with a short TTL (e.g., 1 second) and operates a malicious DNS server that initially returns a legitimate public IP (e.g., 1.2.3.4) when the library's resolveDNSHost callback resolves the hostname. Once that resolution passes validation, the DNS server flips to returning 169.254.169.254 or 192.168.0.1 on the next query; the library's fetch layer then resolves the hostname again and connects to that internal address, returning the response to the attacker. No public exploit code has been identified at time of analysis, but the full vulnerability mechanism is publicly documented in PR #181. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
DNS rebinding in link-preview-js prior to 4.0.4 allows unauthenticated remote attackers to bypass the library's built-in SSRF protections and reach internal HTTP resources from the server hosting the preview service. The resolveDNSHost callback resolves a hostname once for validation but passes the original hostname back to the fetch layer, creating a time-of-check/time-of-use window that an attacker-controlled DNS server can exploit by returning a legitimate public IP during validation and an internal or loopback address on subsequent resolution. Vendor-released patch 4.0.4 is available; no public exploit identified at time of analysis, though the full fix is publicly documented in GitHub PR #181 and the GHSA-cpjf-6666-r8fx advisory.
RemediationAI
Upgrade link-preview-js to version 4.0.4, which resolves the DNS rebinding bypass by fetching the validated resolved IP address directly rather than re-resolving the original hostname (see https://github.com/OP-Engineering/link-preview-js/releases/tag/4.0.4 and patch commits 6ee25043 and f3a3dd84 referenced in GHSA-cpjf-6666-r8fx). As a compensating control prior to patching, enforce egress network policies at the OS or infrastructure layer to block outbound HTTP/S requests to RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback (127.0.0.0/8, ::1), and link-local (169.254.0.0/16) addresses - this eliminates exploitability even if the application-layer check is bypassed, though it may break intentional internal preview use cases that must then be explicitly allowlisted. Implementing a hostname allowlist in the application layer (restricting which domains users may submit for preview) provides an additional defense-in-depth layer with the trade-off of reduced functionality for arbitrary URL inputs.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
link-preview-js (CPE: cpe:2.3:a:op-engineering:link-preview-js:*:*:*:*:*:*:*:*) is an npm library for Node.js that performs server-side HTTP fetches of user-supplied URLs to extract Open Graph metadata for link previews. CWE-918 (Server-Side Request Forgery) describes the root cause class: user-controlled URLs are fetched by the server, enabling attackers to redirect server requests to unintended destinations. The library attempted to mitigate this via a resolveDNSHost callback that resolves the hostname and validates the returned IP. The flaw is a TOCTOU (time-of-check/time-of-use) race: validation checks the DNS-resolved IP, but the actual fetch uses the original hostname string, allowing the DNS layer to be queried again - and to return a different address - between those two operations. The PR #181 diff confirms the fix substitutes the validated resolved IP directly into the fetch URL (e.g., fetching http://93.184.216.34/ instead of http://example.com/), and adds comprehensive IPv4-in-IPv6 normalization to block loopback variants such as ::ffff:127.0.0.1 and 64:ff9b::a9fe:a9fe. Redirect handling was affected by the same hostname-reuse pattern.
Know when Link Preview Js gets its next vulnerability
- 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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
AC:H reflects the DNS rebinding prerequisite of attacker-controlled DNS infrastructure and timing within the TTL window; no authentication required and confidentiality impact is high.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Link Preview JS extracts web links information. Prior to 4.0.4, the resolveDNSHost mitigation in index.ts validates one resolved IP address but fetches the original hostname, allowing an attacker-controlled DNS server to return a public address during validation and a loopback or internal address during the final connection. This DNS rebinding condition bypasses the SSRF protection and can cause the server-side preview fetch to reach internal HTTP resources. Redirect handling is affected by the same validation-to-fetch mismatch. This issue is fixed in version 4.0.4.
Blast Radius
ecosystem impact- 12 npm packages depend on link-preview-js (12 direct, 0 indirect)
Ecosystem-wide dependent count for version 4.0.4.
Executive ViewAI
link-preview-js versions prior to 4.0.4 contain a DNS rebinding vulnerability that permits unauthenticated attackers to bypass SSRF protections and access internal HTTP resources on servers running the library. Organizations deploying link-preview services face direct exposure of internal APIs, cloud metadata endpoints, and backend systems to remote exploitation. Immediate remediation is necessary to protect internal infrastructure from unauthorized access.
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-63439
GHSA-cpjf-6666-r8fx
NVD
CVE.org
EPSS
VulDB
Exploit-DB