CVE-2024-21549: Browsershot Improper Input Validation vulnerability
8.6
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.11732%
CWE
Published
12/20/2024
Updated
2/4/2025
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| spatie/browsershot | composer | < 5.0.3 | 5.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insufficient URL validation in the setUrl method. The original implementation blocked 'file://' variants but didn't account for 'view-source:' prefix, which could wrap file:// URIs. The patch added 'view-source' to the $unsupportedProtocols array, confirming this was the attack vector. The method's validation logic directly controlled URL sanitization, making it the vulnerable entry point. Tests added in BrowsershotTest.php validate() this fix by testing 'view-source' cases.