# CVE-2026-61704: link-preview-js DNS rebinding SSRF bypass

Source: https://junglewise.ai/threats/cve-2026-61704-link-preview-js-dns-rebinding-ssrf-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-20. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-61704 · Severity: high · CVSS 7.5 · Published 2026-08-20

link-preview-js is a JavaScript library that fetches and extracts metadata from web links. A flaw in its SSRF protection allows attackers to bypass the security check through DNS rebinding: the library validates one IP address but then connects to the original hostname, which can resolve to an internal or loopback address on the second lookup. This could expose internal services, metadata, or credentials accessible from the server.

Technologies: [OP-Engineering Link-Preview-Js](https://junglewise.ai/threats/technologies/link-preview-js). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [OP-Engineering](https://junglewise.ai/threats/vendors/op-engineering).

## Quick answers

**Is CVE-2026-61704 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-61704 being exploited in the wild.

**How severe is CVE-2026-61704?** High severity, with a CVSS score of 7.5, published 20 August 2026.

**Which products and versions are affected?** link-preview-js (npm) SEMVER:introduced=0,fixed=4.0.4; OP-Engineering Link-Preview-Js <= 4.0.3.

**Is there a fix for CVE-2026-61704?** Yes. link-preview-js (npm): upgrade to 4.0.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-61704 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-61704?** Check whether you run link-preview-js (npm) or OP-Engineering Link-Preview-Js at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- link-preview-js (npm): upgrade to 4.0.4 or later

  ```sh
  npm install link-preview-js@4.0.4
  ```


## Technical details

This vulnerability exists in link-preview-js versions up to 4.0.3 and is a bypass of the incomplete SSRF fix introduced in CVE-2026-43897. The root cause is a time-of-check/time-of-use (TOCTOU) vulnerability: the library calls resolveDNSHost to validate a single resolved IP address but later performs fetch() against the original hostname without binding the connection to that validated IP. An attacker controlling a DNS server can exploit this by returning a legitimate public IP during the validation phase, then returning a loopback (127.0.0.1) or internal address (10.x.x.x, 172.16.x.x, 192.168.x.x) during the actual fetch, achieving DNS rebinding. Attack vector is network-based, requires no authentication, and is triggered when the application processes a malicious URL. The fix is available in version 4.0.4 and later.

## Affected products

- OP-Engineering link-preview-js <= 4.0.3

## Identifiers

- CVE-2026-61704
- GHSA-cpjf-6666-r8fx

## Timeline

- 2026-06-23: disclosed: Disclosed by GitHub Security Advisory GHSA-cpjf-6666-r8fx
- 2026-08-20: other: Published to National Vulnerability Database
- 2026-09-02: patched: Fixed in version 4.0.4

## References

- [https://api.github.com/users/ahmet-sahiner](https://api.github.com/users/ahmet-sahiner)
- [https://github.com/ahmet-sahiner](https://github.com/ahmet-sahiner)
- [https://api.github.com/users/ahmet-sahiner/gists%7B/gist_id%7D](https://api.github.com/users/ahmet-sahiner/gists%7B/gist_id%7D)
- [https://api.github.com/users/ahmet-sahiner/repos](https://api.github.com/users/ahmet-sahiner/repos)
- [https://avatars.githubusercontent.com/u/97938234?v=4](https://avatars.githubusercontent.com/u/97938234?v=4)
- [https://api.github.com/users/ahmet-sahiner/events%7B/privacy%7D](https://api.github.com/users/ahmet-sahiner/events%7B/privacy%7D)

## Related threats

- [OP-Engineering link-preview-js SSRF via IPv6 and DNS loopback bypass](https://junglewise.ai/threats/cve-2026-43897-op-engineering-link-preview-js-ssrf-via-ipv6-and-dns-loopback)
- [link-preview-js server-side request forgery](https://junglewise.ai/threats/cve-2022-25876-link-preview-js-server-side-request-forgery)
