What’s Vulnerable › Vulnerabilities
CVE-2024-21547
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.9% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-12-18 · updated 2026-06-17
- Weakness: CWE-22
Description
Versions of the package spatie/browsershot before 5.0.2 are vulnerable to Directory Traversal due to URI normalisation in the browser where the file:// check can be bypassed with file:\\. An attacker could read any file on the server by exploiting the normalization of \ into /.
Affected products
- spatie/browsershot: before 5.0.2 — fixed in 5.0.2
How to fix
Upgrade to a fixed version: spatie/browsershot 5.0.2. Check the vendor advisory for mitigations.
References
- https://gist.github.com/chuajianshen/baa71db588cfc038fb5d65624a47be81
- https://github.com/spatie/browsershot/commit/dfc3635b83dd980e5c39f8f8c73e87723b99ca01
- https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8501858
Get alerted when CVE-2024-21547 or the next vulnerability affects your stack