---
id: "CVE-2026-126779"
page: "https://infrastack.ai/live/CVE-2026-126779"
kind: "vulnerability"
aliases: ["CVE-2026-126779"]
title: "Browsershot: root-relative HTML references let attackers read server files"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["browsershot", "laravel", "package", "pdf-generation", "php"]
not_affected_if: ["static-html-only", "version-5.5.0-or-later"]
published_at: "2026-11-11T19:17:38+00:00"
first_seen_at: "2026-11-11T19:28:47+00:00"
updated_at: "2026-11-11T19:29:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126779", "first_seen_at": "2026-11-11T19:28:47+00:00"}]
exploit_sources: []
---

# Browsershot: root-relative HTML references let attackers read server files

Link for people: https://infrastack.ai/live/CVE-2026-126779 (this .md is for agents)

Spatie Browsershot, a PHP library that renders HTML to PDF or screenshots, resolves root-relative references such as /etc/passwd in HTML passed to setHtml() to file:// URLs. An attacker who controls that HTML can read server files and see their contents in the generated PDF or screenshot.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `composer show spatie/browsershot`
- Look for calls to `setHtml()` that include user-supplied HTML

## Fix

- Spatie Browsershot: move to `5.5.0` or later (fixed version per the advisory; the sources state before 5.5.0 is affected)

## Timeline

- 2026-11-11T19:28:47+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126779

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/spatie-browsershot-2.2.0-before-5.5.0-local-file-read-via-sethtml
- [fix] Patch: github.com https://github.com/spatie/browsershot/commit/eba71ab7f4aba23d9321d653ccd19d4e94432516
- [fix] Release notes: github.com https://github.com/spatie/browsershot/releases/tag/5.5.0

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
