AploSec / Disclosures / CVE-2026-126779
Spatie Browsershot 2.2.0 before 5.5.0 Local File Read via setHtml()
CVE-2026-126779 · published 2026-11-11
In plain words: this type of bug lets someone read or write files outside the folder they should be limited to (path traversal). A fixed release is listed.
Summary
CVE-2026-126779 affects spatie/browsershot (Packagist) >= 2.2.0, < 5.5.0: setHtml() lets root-relative or file: URLs read local files into the PDF (CWE-73). Fixed in 5.5.0. CVSS 4.0 base score 8.7 (High), assigned by VulnCheck. Published 2026-11-11 by VulnCheck. Credit: Zachariah Mithani.
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.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
Upgrade spatie/browsershot to 5.5.0 or later. Releases in the affected range (>= 2.2.0, < 5.5.0) are vulnerable. See the linked advisory for details on affected release lines.
Timeline
- 2026-11-11 CVE published
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/spatie-browsershot-2.2.0-before-5.5.0-local-file-read-via-sethtml
- Fix pull requesthttps://github.com/spatie/browsershot/pull/989
- Fix commithttps://github.com/spatie/browsershot/commit/eba71ab7f4aba23d9321d653ccd19d4e94432516
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-126779
- NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-126779
- Severity
- High 8.7CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- spatie/browsershot
- Ecosystem
- Packagist
- Affected
- >= 2.2.0, < 5.5.0
- Fixed
- 5.5.0
- Weakness
- CWE-73
- CNA
- VulnCheck
- Credit
- Zachariah Mithanifinder