GHSA-5p98-wpc9-g498 Server-Side Request Forgery in html-pdf-chrome

Not scored Published

Attackers can exploit SSRF in html-pdf-chrome to access internal server resources via crafted HTML inputs, requiring proper security configuration.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-5p98-wpc9-g498?

GHSA-5p98-wpc9-g498 is a server-side request forgery vulnerability in html-pdf-chrome, published on 4 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Which versions are affected by GHSA-5p98-wpc9-g498?

2 open source packages ship an affected version, including html-pdf-chrome.

PackageAffectedFixed in
html-pdf-chrome npmAll versions0.6.1
html-pdf-chrome npmAll versions0.6.1

How do I fix GHSA-5p98-wpc9-g498?

Upgrade html-pdf-chrome to 0.6.1 or later.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is GHSA-5p98-wpc9-g498 being exploited?

There is no known exploitation of GHSA-5p98-wpc9-g498 in the wild and no public exploit code.

Sources

Is GHSA-5p98-wpc9-g498 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free