Server-Side Request Forgery (SSRF)

Affecting node-pdf-generator package, ALL versions

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

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 ''

Remediation

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

References

CVSS Score

8.2
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    Low
  • Availability
    None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:U/RC:C
Credit
Vasilii Ermilov
CVE
CVE-2020-7740
CWE
CWE-918
Snyk ID
SNYK-JS-NODEPDFGENERATOR-609636
Disclosed
03 Sep, 2020
Published
05 Oct, 2020