Server-Side Request Forgery in html-pdf-chromeGHSA-5p98-wpc9-g498
GHSA-5p98-wpc9-g498 is a security vulnerability in html-pdf-chrome. A fix is available for html-pdf-chrome — see the affected versions and patch details below.
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.
html-pdf-chromenpmDescription
Recommendation
This package is working as intended. A Security section has been added since v0.6.1 to detail proper usage of this library. Npm has revoked their advisory altogether.
Original Advisory
All 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | html-pdf-chrome | all versions | 0.6.1npm install html-pdf-chrome@0.6.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for html-pdf-chrome, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update html-pdf-chrome to 0.6.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5p98-wpc9-g498 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Frequently Asked Questions
Is GHSA-5p98-wpc9-g498 in your dependencies?
Find it across npm, including transitive dependencies.