PT-2025-4134 · Spatie · Spatie/Browsershot
Mrdgef
·
Published
2025-02-05
·
Updated
2025-02-10
·
CVE-2025-1022
CVSS v3.1
8.2
High
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
spatie/browsershot versions prior to 5.0.5
Description
The issue is related to improper input validation in the
setHtml function, which can be bypassed by omitting slashes in the file URI, such as file:../../../../etc/passwd. This is due to missing validations of user input that should block file URI schemes, like file:// and file:/, in the HTML content. The Browsershot::html() function invokes the vulnerable setHtml function.Recommendations
For spatie/browsershot versions prior to 5.0.5, consider updating to version 5.0.5 or later to resolve the issue. As a temporary workaround, consider validating user input to block file URI schemes in the HTML content to minimize the risk of exploitation. Restrict the use of the
setHtml function until a patch is applied.Exploit
Fix
Path traversal
RCE
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Spatie/Browsershot