IT SBIT Services
Schneeberger
DEEN
CVE tracker

Spatie Browsershot: Local file read via setHtml() in HTML rendering

CVE-2026-126779High 8.7

← All vulnerabilities

Summary

Spatie Browsershot versions 2.2.0 up to 5.5.0 (excluding 5.5.0) allow local file reads when HTML passed to setHtml() contains root-relative references such as /etc/passwd in iframe, img, link or script elements. These resolve to file:// URLs and the contents are rendered into the returned PDF or screenshot. An attacker who can influence the HTML can read files that the rendering process can access, for example configuration files or secrets. The vulnerability requires that attacker-influenced HTML reaches the library.

Affected

  • spatie/browsershot from 2.2.0 up to but not including 5.5.0
  • Versions before 2.2.0: Unknown.

Fixed in

  • Fixed in 5.5.0. Local file requests from html() and setHtml() are blocked by default.

Workaround

  • Unknown. No vendor-documented workaround for older versions was found.
  • Do not pass untrusted HTML to html() or setHtml().
  • Run the rendering process as a low-privilege user without access to secrets.

Exploitation

  • Exploitation in the wild: Not confirmed.
  • Public proof of concept: None found.
  • Earlier Browsershot file-read issues were bypasses of previous fixes; no bypass of 5.5.0 is reported yet.

Our recommendation

  • Find all projects using spatie/browsershot (check composer.lock) and note the version.
  • Upgrade to 5.5.0 or later.
  • Retest PDF and screenshot output, because local images, stylesheets and scripts may now be missing.
  • Review all calls to html() and setHtml() for user-influenced input.
  • Limit file system access of the rendering process.
  • Watch for proof-of-concept reports and NVD analysis.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 11 Nov 2026, 20:25.

Original description (NVD)

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.

NVD references (5)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.