Vulnerability in Spatie Browsershot
CVE-2026-126779
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
EPSS exploit prediction
EPSS 0.004, 32.7th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
Weakness classification (CWE)
References
- github.com/spatie/browsershot/pull/989 (issue-tracking, patch)
- github.com/spatie/browsershot/commit/eba71ab7f4aba23d9321d653ccd19d4e94432516 (patch)
- github.com/spatie/browsershot/releases/tag/5.5.0 (release-notes)
- github.com/spatie/browsershot/blob/2.2.0/src/Browsershot.php (technical-description)
- www.vulncheck.com/advisories/spatie-browsershot-2.2.0-before-5.5.0-local-file-r… (third-party-advisory)