{"id":"CVE-2025-1022","published":"2025-02-05T05:00:15Z","modified":"2026-08-23T15:25:35Z","title":"Versions of the package spatie/browsershot before 5.0.5 are vulnerable to Improper Input Validation in the setHtml…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.\r\r**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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00469,"percentile":0.41514,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496747","tags":[]},{"url":"https://github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7","tags":[]},{"url":"https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72","tags":[]},{"url":"https://gist.github.com/mrdgef/a820837c530e09e1dd725e013e0d4341","tags":[]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":8.3},{"name":"CVSS severity","points":5.74}]},"affectedVersions":[{"vendor":"n/a","product":"spatie/browsershot","versions":["< 5.0.5"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-02-05T19:29:07.463789Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"spatie/browsershot","vulnerableRanges":["<5.0.5"],"patched":["5.0.5"],"from":["GHSA-j2gw-r24m-j2qw"],"provenance":"source"}],"summary":{"text":"The flaw is an improper input validation weakness in the setHtml function of the spatie/browsershot package (versions before 5.0.5), reached via Browsershot::html(), where user-supplied HTML content is not checked for file URI schemes. An attacker who can supply HTML content to this function can bypass the intended block on file URIs by omitting the slashes (for example, file:../../../../etc/passwd), which can expose local files on the system; the attack requires only the ability to submit that input, with no authentication or user interaction indicated.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:36:23Z"},"euvd":{"id":"EUVD-2025-0240","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-spatie-browsershot-cve-2022-41706","parents":[{"from":"CVE-2024-21549","to":"CVE-2025-1022","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:spatie/browsershot","fromFixed":"5.0.3","toFixed":"5.0.5","daysApart":47},{"kind":"same-code","provenance":"machine","files":["src/Browsershot.php"],"commits":["https://github.com/spatie/browsershot/commit/f791ce0ae8dd99367dbfa30588ee31e1196e1728","https://github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7","https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72"],"basis":"shared function","functions":["setUrl"]}]},{"from":"CVE-2022-43984","to":"CVE-2025-1022","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Exceptions/FileUrlNotAllowed.php"],"commits":["https://github.com/spatie/browsershot/commit/92cf16fc098211731f80d21687abeafbe2c457ad","https://github.com/spatie/browsershot/commit/554c3e566fde8c47ad1ac9be47eaeb9a84c4dfe2","https://github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7","https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72"],"basis":"shared function","functions":["setUrl"]}]},{"from":"CVE-2024-21547","to":"CVE-2025-1022","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Browsershot.php"],"commits":["https://github.com/spatie/browsershot/commit/dfc3635b83dd980e5c39f8f8c73e87723b99ca01","https://github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7","https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72"],"basis":"shared function","functions":["setUrl"]}]}],"packageHistory":[{"cve":"CVE-2024-21544","published":"2024-12-13","fixed":"5.0.1","kev":false},{"cve":"CVE-2024-21547","published":"2024-12-18","fixed":"5.0.2","kev":false},{"cve":"CVE-2024-21549","published":"2024-12-20","fixed":"5.0.3","kev":false},{"cve":"CVE-2025-1022","published":"2025-02-05","fixed":"5.0.5","kev":false},{"cve":"CVE-2025-1026","published":"2025-02-05","fixed":"5.0.5","kev":false}],"package":"Packagist:spatie/browsershot"}}