CVE-2024-21549: Versions of the package spatie/browsershot before 5.0.3 are vulnerable to Improper Input Validation due to...
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).
Security readout for executives and security teams
Plain-English summary
Browsershot versions before 5.0.3 may let a remote attacker make an application read local files when attacker-controlled input reaches URL processing. This can expose credentials, configuration, or other sensitive data available to the browser process. The issue bypasses an earlier fix for CVE-2024-21544.
Executive priority
Prioritize remediation for public services that generate screenshots, PDFs, or browser output from user-influenced URLs. The primary business risk is unauthorized disclosure of secrets or configuration files. Upgrade promptly, then verify deployed versions and reduce the browser process's filesystem access.
Technical view
CVE-2024-21549 is improper input validation in spatie/browsershot's setUrl method. A view-source wrapper around a local-file URL can bypass URL validation and enable arbitrary local-file reading. The supplied CVSS 3.1 score is 8.6, reflecting network reachability, low complexity, no required privileges, and high confidentiality impact.
Likely exposure
Exposure is most likely where applications run spatie/browsershot before 5.0.3 and allow untrusted or indirectly attacker-controlled values to reach setUrl. Impact depends on the files and permissions available to the browser process. The source bundle does not identify specific exposed deployments.
Exploitation context
The CVSS vector records proof-of-concept maturity, but the supplied sources do not establish active exploitation. This CVE is not listed as KEV in the bundle. Treat internet-facing, unauthenticated URL-processing paths as the highest-priority exposure.
Researcher notes
This is a CWE-20 validation flaw and a bypass of the CVE-2024-21544 fix. Review the referenced corrective commit when assessing custom forks or backports. The bundle supports confidentiality impact and the affected-version boundary, but provides no confirmed victim reports or evidence of active exploitation.
Mitigation direction
Upgrade spatie/browsershot to version 5.0.3 or later.
Prevent untrusted input from directly or indirectly controlling setUrl values.
Restrict the browser process from reading unnecessary files and secrets.
Review current vendor guidance before applying compensating controls.
Validation and detection
Inventory Composer lockfiles and deployed artifacts for spatie/browsershot versions earlier than 5.0.3.
Trace whether user-controlled values can reach setUrl through request parameters or stored content.
Confirm production resolves version 5.0.3 or later after remediation.
Defensively verify that local-file URL wrappers are rejected without accessing sensitive files.
Review application logs for unusual local-file or view-source URL handling attempts.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-20: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-20 · source CWE mapping
Improper Input Validation
Improper Input Validation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.