Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. spatie/browsershot
  4. ›
  5. CVE-2024-21547

CVE-2024-21547: Spatie Browsershot Directory Traversal vulnerability

December 18, 2024

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

References

  • gist.github.com/chuajianshen/baa71db588cfc038fb5d65624a47be81
  • github.com/advisories/GHSA-v528-6rq9-h6gw
  • github.com/spatie/browsershot
  • github.com/spatie/browsershot/commit/dfc3635b83dd980e5c39f8f8c73e87723b99ca01
  • nvd.nist.gov/vuln/detail/CVE-2024-21547
  • security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8501858

Code Behaviors & Features

Detect and mitigate CVE-2024-21547 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.0.2

Fixed versions

  • 5.0.2

Solution

Upgrade to version 5.0.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

packagist/spatie/browsershot/CVE-2024-21547.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:06 +0000.