CVE-2025-1022: Versions of the package spatie/browsershot before 5.0.5 are vulnerable to Improper Input Validation in the...
Versions of the package spatie/browsershot before 5.0.5 are vulnerable to Improper Input Validation in the setHtml function, invoked by Browsershot::html(), which can be bypassed by omitting the slashes in the file URI (e.g., file:../../../../etc/passwd). This is due to missing validations of the user input that should be blocking file URI schemes (e.g., file:// and file:/) in the HTML content.
**Note:** Further analysis has identified additional proof-of-concept exploits leveraging the vulnerable function. Developers using this package should ensure proper input validation to mitigate potential risks, as the issue remains unaddressed.
Security readout for executives and security teams
Plain-English summary
Browsershot can mishandle attacker-controlled HTML and allow local files accessible to the rendering service to be exposed. Internet-facing document, image, or PDF generation features are the clearest concern. The supplied sources rate this high severity, but contain conflicting statements about whether version 5.0.5 fully resolves the issue.
Executive priority
Prioritize within the immediate vulnerability-management cycle where public users can influence rendered HTML. Expedite isolation or feature restriction if sensitive files are readable. Lower urgency may be appropriate only after confirming no untrusted input path exists. Do not interpret the absence of KEV listing as proof of safety.
Technical view
CVE-2025-1022 is improper input validation in spatie/browsershot setHtml, called through Browsershot::html(). Incomplete blocking of file URI variations can permit unintended local-file access. The supplied CVSS 4.0 score is 8.8, indicating network-reachable, low-complexity exploitation without privileges or user interaction, with high confidentiality and limited integrity impact.
Likely exposure
Exposure requires an application using a vulnerable Browsershot release and passing untrusted or attacker-influenced HTML into Browsershot::html(). Risk depends on whether that path is remotely reachable and which local files the browser or rendering process can read. The bundle does not identify specific deployed applications or confirm universal exposure.
Exploitation context
Public proof-of-concept material and additional reported demonstrations exist, and the CVSS vector marks proof-of-concept maturity. However, the CVE is not listed as KEV in the supplied bundle, and no cited evidence establishes active exploitation in the wild. Treat practical exploitability as demonstrated, not confirmed widespread abuse.
Researcher notes
The bundle conflicts: its title defines affected versions as earlier than 5.0.5, while its note says the issue remains unaddressed. Two upstream commits are referenced, but their exact remediation status is not established here. Validate the installed code and vendor guidance rather than relying solely on the stated version boundary. No evidence supplied confirms active exploitation.
Mitigation direction
Inventory applications using spatie/browsershot and identify versions before 5.0.5.
Upgrade to 5.0.5 or later, then confirm current vendor guidance because the supplied record is contradictory.
Reject untrusted file URI schemes and equivalent malformed variants before HTML reaches Browsershot.
Minimize filesystem permissions and isolate the browser rendering process from secrets and sensitive files.
Temporarily disable attacker-controlled HTML rendering where safe validation cannot be guaranteed.
Validation and detection
Inspect dependency manifests and lockfiles for the installed spatie/browsershot version.
Trace whether user-controlled content can reach Browsershot::html() or setHtml().
Verify URI filtering handles malformed and alternate file-scheme representations, using authorized controlled tests.
Confirm the rendering account cannot read credentials, configuration secrets, or unrelated tenant files.
Review rendering-service logs for suspicious local-file references or unexpected file access.
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.
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.