# CVE-2024-21544: Browsershot Local File Inclusion

- Severity: High 7.7 (CVSS:4.0, scored by snyk) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/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.57%, higher than 48% of CVEs (2026-12-01)
- Published: 2024-12-13T05:00:14.744Z
- Modified: 2026-08-14T15:25:27.382Z
- Also known as: GHSA-g2r4-phv7-5fgv
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: snyk

## Description

Versions of the package spatie/browsershot before 5.0.1 are vulnerable to Improper Input Validation due to improper URL validation in the setUrl method.

An attacker can exploit this vulnerability by using leading whitespace (%20) before the file:// protocol, resulting in Local File Inclusion, which allows the attacker to read sensitive files on the server.

(As written by CVE List.)

## Affected

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

## Every score

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

## References

- <https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496745> (web)
- <https://github.com/spatie/browsershot/blob/1e212b596c104138550ed4ef1b9977d8df570c67/src/Browsershot.php%23L258-L269> (web)
- <https://github.com/spatie/browsershot/commit/fae8396641b961f62bd756920b14f01a4391296e> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21544> (advisory)
- <https://github.com/spatie/browsershot> (package)

## Sources

- CVE List: [CVE-2024-21544](https://www.cve.org/CVERecord?id=CVE-2024-21544), CVE Terms of Use, modified 2026-08-14
- GitHub Advisory Database: [GHSA-g2r4-phv7-5fgv](https://github.com/advisories/GHSA-g2r4-phv7-5fgv), CC-BY-4.0, modified 2025-02-04
- NVD: [CVE-2024-21544](https://nvd.nist.gov/vuln/detail/CVE-2024-21544), Public domain, modified 2026-06-17

---

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