CVE-2025-1022
Versions of the package spatie/browsershot before 5.0.5 are …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- gist.github.com/mrdgef/a820837c530e09e1dd725e013e0d4341
- github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7
- github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72
- security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496747
- nvd.nist.gov/vuln/detail/CVE-2025-1022
- github.com/advisories/GHSA-j2gw-r24m-j2qw
- nvd.nist.gov/vuln/detail/CVE-2025-1022
- cve.org/CVERecord?id=CVE-2025-1022
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.