PhantomJS Arbitrary File Read
Date: 2022-05
Affected: npm/phantomjs
Attack vector: path-traversal
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2019-17221
CWE: CWE-552
CVSS: 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

PhantomJS through 2.1.1 has an arbitrary file read vulnerability, as demonstrated by an XMLHttpRequest for a `file://` URI. The vulnerability exists in the `page.open()` function of the webpage module, which loads a specified URL and calls a given callback. An attacker can supply a specially crafted HTML file, as user input, that allows reading arbitrary files on the filesystem. For example, if `page.render()` is the function callback, this generates a PDF or an image of the targeted file. **NOTE**: this product is no longer developed.


Mitigations:

Architectural layers (MAESTRO):