7.5high
link-preview-js DNS Rebinding SSRF Bypass / Incomplete Fix for CVE-2026-43897
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 40% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-cpjf-6666-r8fx
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OP-Engineering link-preview-js | < 4.0.4 | CVE List |
| link-preview-js (npm) | before 4.0.4 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
The existing advisory GHSA-4gp8-rjrq-ch6q / CVE-2026-43897 states that the SSRF issue was fixed in 4.0.1. However, 4.0.3 remains bypassable when the documented resolveDNSHost mitigation is used.
Root cause: The library validates one resolved IP address through resolveDNSHost, but later performs fetch() against the original hostname without pinning the connection to the validated IP. An attacker-controlled DNS server can return a public IP during validation and a loopback/internal IP during the final connection.
Impact: This allows an attacker to bypass the documented SSRF mitigation and make the server-side fetch reach loopback or internal addresses under DNS rebinding conditions.
This appears to be either an incomplete fix for CVE-2026-43897 or a new DNS rebinding SSRF bypass affecting the latest version.
The PoC was reproduced in a local-only controlled environment to avoid targeting production or third-party systems. Evidence and reproduction details can be provided privately.
NVD (es)
Link Preview JS extrae información de enlaces web. Antes de la versión 4.0.4, la mitigación resolveDNSHost en index.ts valida una dirección IP resuelta pero obtiene el nombre de host original, permitiendo que un servidor DNS controlado por un atacante devuelva una dirección pública durante la validación y una dirección de bucle invertido o interna durante la conexión final. Esta condición de revinculación de DNS elude la protección SSRF y puede hacer que la obtención de la vista previa del lado del servidor alcance recursos HTTP internos. El manejo de redirecciones se ve afectado por la misma falta de coincidencia entre validación y obtención. Este problema está solucionado en la versión 4.0.4.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-61704 changed 2026-08-25 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cpjf-6666-r8fx changed 2026-09-02 | CC-BY-4.0 |
| NVD | CVE-2026-61704 changed 2026-10-18 | Public domain |