CVE-2024-21549: Improper Input Validation in spatie/browsershot
Versions of the package spatie/browsershot before 5.0.3 are vulnerable to Improper Input Validation due to improper URL validation in 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](https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496745).
AI Analysis
Technical Summary
CVE-2024-21549 affects spatie/browsershot versions prior to 5.0.3 due to improper input validation in the setUrl method. An attacker can exploit this by using the view-source:file:// URL scheme, enabling arbitrary local file reading. This vulnerability bypasses the fix implemented for CVE-2024-21544, indicating a regression or incomplete remediation. The vulnerability has a CVSS 4.0 score of 7.7, reflecting network attack vector, low complexity, no privileges or user interaction required, and no confidentiality, integrity, or availability impact but with high scope change.
Potential Impact
An attacker can read arbitrary local files on the system where spatie/browsershot is used by exploiting improper URL validation. This can lead to unauthorized disclosure of sensitive information stored locally. There is no indication of privilege escalation or remote code execution from the provided data.
Mitigation Recommendations
A fix is available in spatie/browsershot version 5.0.3 and later. Users should upgrade to version 5.0.3 or newer to remediate this vulnerability. Patch status is not explicitly stated in the input but the description implies versions before 5.0.3 are vulnerable, so upgrading to 5.0.3 or later is recommended.
CVE-2024-21549: Improper Input Validation in spatie/browsershot
Description
Versions of the package spatie/browsershot before 5.0.3 are vulnerable to Improper Input Validation due to improper URL validation in 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](https://security.snyk.io/vuln/SNYK-PHP-SPATIEBROWSERSHOT-8496745).
CVSS v4.0
Score 7.7high
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-21549 affects spatie/browsershot versions prior to 5.0.3 due to improper input validation in the setUrl method. An attacker can exploit this by using the view-source:file:// URL scheme, enabling arbitrary local file reading. This vulnerability bypasses the fix implemented for CVE-2024-21544, indicating a regression or incomplete remediation. The vulnerability has a CVSS 4.0 score of 7.7, reflecting network attack vector, low complexity, no privileges or user interaction required, and no confidentiality, integrity, or availability impact but with high scope change.
Potential Impact
An attacker can read arbitrary local files on the system where spatie/browsershot is used by exploiting improper URL validation. This can lead to unauthorized disclosure of sensitive information stored locally. There is no indication of privilege escalation or remote code execution from the provided data.
Mitigation Recommendations
A fix is available in spatie/browsershot version 5.0.3 and later. Users should upgrade to version 5.0.3 or newer to remediate this vulnerability. Patch status is not explicitly stated in the input but the description implies versions before 5.0.3 are vulnerable, so upgrading to 5.0.3 or later is recommended.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- snyk
- Date Reserved
- 2023-12-22T12:33:20.128Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68e0f3c1b66c7f7acdd3e952
Added to database: 10/04/2025, 10:15:29 UTC
Last enriched: 08/16/2026, 13:02:21 UTC
Last updated: 09/10/2026, 19:36:47 UTC
Views: 94
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.