GHSA-5p98-wpc9-g498: Html pdf chrome Server-Side Request Forgery Vulnerability
HIGHGHSA-5p98-wpc9-g498 is a HIGH server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Html pdf chrome libraries in the npm ecosystem. The issue involves server-side request forgery in html-pdf-chrome. Remediation is available by upgrading affected packages to version 0.6.1.
GHSA-5p98-wpc9-g498 at a Glance
How to Fix GHSA-5p98-wpc9-g498
To remediate this vulnerability, upgrade all affected Html pdf chrome dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install html-pdf-chrome@0.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls html-pdf-chrome
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-5p98-wpc9-g498, inspect your project dependencies using npm:
npm ls html-pdf-chrome
Analyze the terminal output to locate any version of Html pdf chrome in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.1), your application is affected.
Note: The npm ls html-pdf-chrome command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Html pdf chrome, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5p98-wpc9-g498 Affected Html pdf chrome Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
html-pdf-chrome
|
npm |
< 0.6.1
|
0.6.1
|
References
Frequently Asked Questions
What is GHSA-5p98-wpc9-g498?
Which Html pdf chrome versions are affected?
What version fixes GHSA-5p98-wpc9-g498?
Is html-pdf-chrome affected?
What CWE is associated with GHSA-5p98-wpc9-g498?
How can I check npm dependencies for GHSA-5p98-wpc9-g498?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5p98-wpc9-g498",
"modified" : "2022-06-22T19:28:32Z",
"published" : "2020-09-04T15:21:32Z",
"aliases" : [ ],
"summary" : "Server-Side Request Forgery in html-pdf-chrome",
"details" : "## Recommendation\nThis package is working as intended. A [Security](https://github.com/westy92/html-pdf-chrome#security) section has been added since v0.6.1 to detail proper usage of this library. Npm has revoked their advisory altogether.\n\n## Original Advisory\nAll versions of `html-pdf-chrome` are vulnerable to Server-Side Request Forgery (SSRF). The package executes HTTP requests if the parsed HTML contains external references to resources, such as `<iframe src=\"http://localhost\" height=\"800px\" width=\"800px\"></iframe>`. This allows attackers to access resources through HTTP that are accessible to the server, including private resources in the hosting environment.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "html-pdf-chrome"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/westy92/html-pdf-chrome/issues/249"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/westy92/html-pdf-chrome"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1339"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:55:39Z",
"nvd_published_at" : null
}
}