CVE-2026-126779 Spatie Browsershot 2.2.0 before 5.5.0 Local File Read via setHtml()

High 8.7 Published Updated

Attackers supplying HTML to Browsershot's setHtml can read local server files rendered into PDF or screenshot.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Harmful if only installed
No
Needs a specific call
Yes
Fix
None listed

What is CVE-2026-126779?

CVE-2026-126779 is a high-severity path traversal vulnerability in spatie browsershot, published on 11 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Spatie Browsershot 2.2.0 before 5.5.0 contains a local file read vulnerability that allows attackers to read server files by supplying root-relative references in HTML passed to setHtml(). Attackers can embed iframe, img, link or script elements referencing paths like /etc/passwd, which resolve to file:// URLs and render file contents into the returned PDF or screenshot.

Weakness: CWE-73

Which versions are affected by CVE-2026-126779?

An affected version is only exploitable if your software calls setHtml(). Many projects that include it are not exposed.

How do I fix CVE-2026-126779?

No fix has been published for CVE-2026-126779 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-126779 being exploited?

There is no known exploitation of CVE-2026-126779 in the wild and no public exploit code.

Sources

Also known as GHSA-wp7g-f22j-79fp.

Is CVE-2026-126779 in your software?

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

Check your SBOMs for free