Server-Side Request Forgery (SSRF) Affecting node-pdf-generator package, versions *


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.13% (50th 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-NODEPDFGENERATOR-609636
  • published5 Oct 2020
  • disclosed3 Sept 2020
  • creditVasilii Ermilov

Introduced: 3 Sep 2020

CVE-2020-7740  (opens in a new tab)
CWE-918  (opens in a new tab)
First added by Snyk

How to fix?

There is no fixed version for node-pdf-generator.

Overview

node-pdf-generator is a Web server to generate PDF's from HTML

Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF). Due to lack of user input validation and sanitization done to the content given to node-pdf-generator, it is possible for an attacker to craft a url that will be passed to an external server allowing an SSRF attack.

PoC


git clone https://github.com/darrenhaken/node-pdf-generator.git

cd node-pdf-generator

npm install

node index.js

The app will be available at https://localhost:1337

send crafted request like:


curl --location --request POST 'https://127.0.0.1:1337/' --header 'Content-Type: text/html' --data-raw ''

CVSS Scores

version 3.1