# CVE-2025-1022: Browsershot Path Traversal

- Severity: High 8.8 (CVSS:4.0, scored by snyk) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/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.47%, higher than 42% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-02-05T05:00:15.399Z
- Modified: 2026-08-23T15:25:35.610Z
- Also known as: GHSA-j2gw-r24m-j2qw
- Weaknesses: CWE-20, 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.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.

**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.

(As written by CVE List.)

## Affected

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

## Every score

- snyk: CVSS:4.0 8.8 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P`
- snyk: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P`
- GitHub: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://gist.github.com/mrdgef/a820837c530e09e1dd725e013e0d4341> (exploit, web)
- <https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496747> (web)
- <https://github.com/spatie/browsershot/commit/bcfd608b264fab654bf78e199bdfbb03e9323eb7> (web)
- <https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-1022> (advisory)
- <https://github.com/spatie/browsershot> (package)

## Sources

- CVE List: [CVE-2025-1022](https://www.cve.org/CVERecord?id=CVE-2025-1022), CVE Terms of Use, modified 2026-08-23
- GitHub Advisory Database: [GHSA-j2gw-r24m-j2qw](https://github.com/advisories/GHSA-j2gw-r24m-j2qw), CC-BY-4.0, modified 2025-02-05
- NVD: [CVE-2025-1022](https://nvd.nist.gov/vuln/detail/CVE-2025-1022), Public domain, modified 2026-07-15

---

Page: https://cve.day/CVE-2025-1022 · Whole record: https://cve.day/CVE-2025-1022.json · Rebuilt by cve.day 2026-11-25T22:58:53.796Z
