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

CVE-2024-21549: Browsershot Improper Input Validation vulnerability

December 20, 2024 (updated February 4, 2025)

Versions of the package spatie/browsershot before 5.0.3 are vulnerable to Improper Input Validation due to improper URL validation through the setUrl method. An attacker can exploit this vulnerability by utilizing view-source:file://, which allows for arbitrary file reading on a local file.

Note:

This is a bypass of the fix for CVE-2024-21544.

References

  • github.com/advisories/GHSA-c9f5-29f6-c35w
  • github.com/spatie/browsershot
  • github.com/spatie/browsershot/commit/f791ce0ae8dd99367dbfa30588ee31e1196e1728
  • github.com/spatie/browsershot/discussions/906
  • nvd.nist.gov/vuln/detail/CVE-2024-21549
  • security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8533023

Code Behaviors & Features

Detect and mitigate CVE-2024-21549 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.3

Fixed versions

  • 5.0.3

Solution

Upgrade to version 5.0.3 or above.

Impact 8.6 HIGH

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

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read
  • CWE-20: Improper Input Validation
  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

packagist/spatie/browsershot/CVE-2024-21549.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:15 +0000.