CVE-2026-126779: Spatie Browsershot arbitrary file read via HTML

CVE-2026-126779 · Severity: high · CVSS 7.5 · Published 2026-11-11

Spatie Browsershot is a PHP library that converts web pages and HTML into PDF and screenshot files. Versions before 5.5.0 allow attackers to read arbitrary files from the server by embedding references to local file paths in HTML passed to the library, which then includes the file contents in the generated PDF or screenshot output.

Vendors: Spatie.

Quick answers

Is CVE-2026-126779 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-126779 being exploited in the wild.
How severe is CVE-2026-126779?
High severity, with a CVSS score of 7.5, published 11 November 2026.
Which products and versions are affected?
Spatie Browsershot 2.2.0 before 5.5.0.
Is there a fix for CVE-2026-126779?
Yes: fixed in 5.5.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-126779 attacked?
It is attacked over the network.
Am I affected by CVE-2026-126779?
Check whether you run Spatie Browsershot at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 5.5.0

Technical details

The vulnerability exists in the setHtml() method, which accepts HTML input without sanitizing or restricting file:// protocol URLs. Attackers can embed iframe, img, link, or script elements with root-relative paths (e.g., /etc/passwd) that resolve to file:// URLs when rendered by Chromium headless, exposing server file contents. This is a path traversal vulnerability requiring only the ability to control HTML input to the library; the attacker gains unauthorized file read access on the server.

Affected products

  • Spatie Browsershot 2.2.0 before 5.5.0

Timeline

  • 2026-11-11: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.