Server-side Request Forgery (SSRF) Affecting phantomjs-seo 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.52% (77th 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-PHANTOMJSSEO-609638
  • published5 Oct 2020
  • disclosed3 Sept 2020
  • creditVasilii Ermilov

Introduced: 3 Sep 2020

CVE-2020-7739  (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 phantomjs-seo.

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

CVSS Scores

version 3.1