CVE-2025-1022 Details
Description
Versions of the package spatie/browsershot before 5.0.5 are vulnerable to Improper Input Validation in the setHtml function, invoked by Browsershot::html(), which can be bypassed by omitting the slashes in the file URI (e.g., file:../../../../etc/passwd). This is due to missing validations of the user input that should be blocking file URI schemes (e.g., file:// and file:/) in the HTML content. **Note:** Further analysis has identified additional proof-of-concept exploits leveraging the vulnerable function. Developers using this package should ensure proper input validation to mitigate potential risks, as the issue remains unaddressed.
A vulnerability exists in the Spatie Browsershot package, specifically in versions prior to 5.0.5, due to improper input validation in the setHtml function. This vulnerability can be exploited by bypassing the validation of file URI schemes in the HTML content, allowing for arbitrary file reads from the server's file system. The issue arises because the Same-origin policy does not restrict local file references when the origin is a local HTML document.
Users can upgrade to Spatie Browsershot version 5.0.5 or higher, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Feb 5, 2025CISA-ADP
Assessed Feb 5, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://gist.github.com/mrdgef/a820837c530e09e1dd725e013e0d4341 | CISA-ADP | ExploitTechnical Description |
| https://gist.github.com/mrdgef/a820837c530e09e1dd725e013e0d4341 | [email protected] | ExploitTechnical Description |
| https://github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7 | [email protected] | Source CodeVendor |
| https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72 | [email protected] | Source CodeVendor |
| https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496747 | [email protected] | AdvisoryExploitRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-20 | Improper Input Validation | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| spatie/browsershot | < 5.0.5 (semver) |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 15, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 29, 2026 | Data Remediation | [email protected] |
| Feb 5, 2025 | CVE Modified | CISA-ADP |
| Feb 5, 2025 | New CVE Received | [email protected] |
Volerion