Spatie Browsershot 2.2.0 before 5.5.0 Local File Read via setHtml()
- State
- Published
- Severity
- 8.7 High
- Published
- Nov 11, 2026
- Updated
- Nov 13, 2026
- Reserved
- Nov 11, 2026
Description
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.
| Product | Versions |
|---|---|
| browsershot spatie | 2.2.0 to before 5.5.0 Affected5.5.0 Not Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.7 High | VulnCheck | |
| 3.1 | 7.5 High | VulnCheck |
Weaknesses
- CWE-73 External Control of File Name or Path
References
- https://github.com/spatie/browsershot/pull/989PatchIssue Tracker
- https://github.com/spatie/browsershot/commit/eba71ab7f4aba23d9321d653ccd19d4e94432516Patch
- browsershot 5.5.0 Release NotesRelease Notes
- https://github.com/spatie/browsershot/blob/2.2.0/src/Browsershot.php#L242-L248Technical Details
- VulnCheck Advisory: Spatie Browsershot 2.2.0 before 5.5.0 Local File Read via setHtml()Third-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.