CVE-2026-43897: Link preview js Link-preview-js Vulnerable To IPv6 And Vulnerability

HIGH
Advisory Identifier: GHSA-4gp8-rjrq-ch6q
CWE-918
Published
Advisory Summary

CVE-2026-43897 is a HIGH link-preview-js vulnerable to ipv6 and vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Link preview js libraries in the npm ecosystem. The issue involves link-preview-js vulnerable to ipv6 and internal loopback attacks. Remediation is available by upgrading affected packages to version 4.0.1.

CVE-2026-43897 at a Glance

CVE Identifier CVE-2026-43897
GHSA Identifier GHSA-4gp8-rjrq-ch6q
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Link preview js
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-43897

To remediate this vulnerability, upgrade all affected Link preview js dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

link-preview-js fixed: 4.0.1
npm install link-preview-js@4.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls link-preview-js

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-43897, inspect your project dependencies using npm:

npm ls link-preview-js

Analyze the terminal output to locate any version of Link preview js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.1), your application is affected.

Note: The npm ls link-preview-js command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Link preview js, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The library did not check for IPv6 loopback attacks. There was also a DNS attack, where an address could be resolved into an internal IP. This could cause internal data leaks. ### Patches Problem has been patched in version 4.0.1. However, it cannot be completely solved by the package alone. The regex used for validation has been tightened for IPv6 addresses. The DNS resolving, however, is more difficult. The regex has been tightened to prohibit .internal, .local, .nip.io and .sslip.io addresses, however there can be other services not on the list, therefore it is imperative that users use the resolveDNSHost option to do DNS resolution before fetching content. To that regard a (scary) error message has been added when the option is not set. ### Workarounds Users can do their own validation before fetching content. Reported by https://github.com/Andrew-most-likely

CVE-2026-43897 Affected Link preview js Versions

1 component(s)
Fixed Versions:
4.0.1
Product / Package Ecosystem Affected Versions Fixed Version
link-preview-js
npm
< 4.0.1
4.0.1

References

Frequently Asked Questions

What is CVE-2026-43897?
CVE-2026-43897 is a security vulnerability in Link preview js involving link-preview-js vulnerable to IPv6 and internal loopback attacks under CWE-918: Server-Side Request Forgery (SSRF).
Which Link preview js versions are affected?
Affected versions include releases prior to 4.0.1 across affected packages: link-preview-js.
What version fixes CVE-2026-43897?
Upgrading to 4.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is link-preview-js affected?
Yes, link-preview-js is affected in releases prior to 4.0.1. Upgrade your dependency to 4.0.1 or later.
What CWE is associated with CVE-2026-43897?
CVE-2026-43897 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2026-43897?
Run the dependency tree command: 'npm ls link-preview-js'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4gp8-rjrq-ch6q",
  "modified" : "2026-05-13T14:20:09Z",
  "published" : "2026-05-05T20:13:02Z",
  "aliases" : [ "CVE-2026-43897" ],
  "summary" : "link-preview-js vulnerable to IPv6 and internal loopback attacks",
  "details" : "### Impact\nThe library did not check for IPv6 loopback attacks. There was also a DNS attack, where an address could be resolved into an internal IP. This could cause internal data leaks.\n\n### Patches\nProblem has been patched in version 4.0.1. However, it cannot be completely solved by the package alone. The regex used for validation has been tightened for IPv6 addresses. \n\nThe DNS resolving, however, is more difficult. The regex has been tightened to prohibit .internal, .local, .nip.io and .sslip.io addresses, however there can be other services not on the list, therefore it is imperative that users use the resolveDNSHost option to do DNS resolution before fetching content. To that regard a (scary) error message has been added when the option is not set.\n\n### Workarounds\nUsers can do their own validation before fetching content.\n\nReported by https://github.com/Andrew-most-likely",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "link-preview-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.0.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/OP-Engineering/link-preview-js/security/advisories/GHSA-4gp8-rjrq-ch6q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-43897"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OP-Engineering/link-preview-js/pull/179"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OP-Engineering/link-preview-js/commit/4396d48909fab37553c0e93e26447fe218363ede"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OP-Engineering/link-preview-js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OP-Engineering/link-preview-js/releases/tag/4.0.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-05T20:13:02Z",
    "nvd_published_at" : "2026-05-11T22:22:14Z"
  }
}