Server-side Request Forgery (SSRF) Affecting link-preview-js package, versions <2.1.16


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.08% (38th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-LINKPREVIEWJS-2933520
  • published29 Jun 2022
  • disclosed22 Jun 2022
  • creditReworr

Introduced: 22 Jun 2022

CVE-2022-25876  (opens in a new tab)
CWE-918  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade link-preview-js to version 2.1.16 or higher.

Overview

link-preview-js is a Javascript module to extract and fetch HTTP link information from blocks of text.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) which allows attackers to send arbitrary requests to the local network and read the response. This is due to flawed DNS rebinding protection.

PoC:

  1. Find domain that resolved to private address with reverse ip lookup or use domains localtest.me (127.0.0.1) or devhead.net (127.0.0.1 + 192.168.1.1 + 192.168.0.1).

  2. Write it to getLinkPreview.

  3. You see content from your local address.

CVSS Scores

version 3.1