Server-side Request Forgery (SSRF)

Affecting phantomjs-seo package, ALL versions

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

Overview

phantomjs-seo is an express middleware for prerendering pages with phantomjs for search engine crawling

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF). It is possible for an attacker to craft a url that will be passed to a PhantomJS instance allowing for an SSRF attack.

PoC

mkdir poc
cd poc
npm init -y
npm install express
npm install phantomjs-seo

create index.js with basic Express app

const express = require('express')
const app = express()
const port = 3000

// phantomjs-seo middleware init
const seo = require('phantomjs-seo')
app.use(seo)

app.get('/', (req, res) => res.send('Hello World!'))
app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))

run it:

node index.js

Remediation

There is no fixed version for phantomjs-seo.

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-7739
CWE
CWE-918
Snyk ID
SNYK-JS-PHANTOMJSSEO-609638
Disclosed
03 Sep, 2020
Published
05 Oct, 2020