# CVE-2024-21547: Spatie Browsershot Directory Traversal vulnerability

- Severity: High 8.7 (CVSS:4.0, scored by snyk) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.94%, higher than 61% of CVEs (2026-12-01)
- Published: 2024-12-18T06:06:04.591Z
- Modified: 2026-06-17T07:09:43.157Z
- Also known as: GHSA-v528-6rq9-h6gw
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: snyk

## 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 /.

(As written by CVE List.)

## Affected

- spatie/browsershot: before 5.0.2
- spatie/browsershot (Packagist): before 5.0.2

## Every score

- snyk: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P`
- snyk: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P`

## References

- <https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8501858> (web)
- <https://gist.github.com/chuajianshen/baa71db588cfc038fb5d65624a47be81> (web)
- <https://github.com/spatie/browsershot/commit/dfc3635b83dd980e5c39f8f8c73e87723b99ca01> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21547> (advisory)
- <https://github.com/spatie/browsershot> (package)

## Sources

- CVE List: [CVE-2024-21547](https://www.cve.org/CVERecord?id=CVE-2024-21547), CVE Terms of Use, modified 2024-12-18
- GitHub Advisory Database: [GHSA-v528-6rq9-h6gw](https://github.com/advisories/GHSA-v528-6rq9-h6gw), CC-BY-4.0, modified 2024-12-18
- NVD: [CVE-2024-21547](https://nvd.nist.gov/vuln/detail/CVE-2024-21547), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-21547 · Whole record: https://cve.day/CVE-2024-21547.json · Rebuilt by cve.day 2026-11-25T22:58:50.219Z
