Skip to main content
EPSS 0.5%top 61%

CVE-2025-1022: Improper Input Validation in spatie/browsershot

0
High
VulnerabilityCVE-2025-1022cvecve-2025-1022gcve
Published: 02/05/2025 (02/05/2025, 05:00:15 UTC)
Source: CVE Database V5
Product: spatie/browsershot

Description

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.

CVSS v4.0

Score 8.8high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P

Affected software

Packagistmore threats →ai
spatie/browsershot
pkg:composer/spatie/browsershot
Affected versions
<5.0.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/13/2026, 18:07:16 UTC

Technical Analysis

The vulnerability in spatie/browsershot affects versions prior to 5.0.5 and involves improper input validation in the setHtml function, called by Browsershot::html(). The flaw allows bypassing of file URI scheme restrictions by omitting slashes in the file URI (e.g., file:../../../../etc/passwd), enabling injection of local file references into HTML content. This occurs because the package does not properly validate or block file URI schemes in user-supplied HTML. Additional proof-of-concept exploits have been identified, but no official fix or patch is currently available.

Potential Impact

An attacker can exploit this vulnerability to inject HTML content that references local files via crafted file URIs, potentially exposing sensitive local files or causing unintended behavior in applications using the vulnerable package. The CVSS 4.0 score of 8.8 indicates high severity with network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality.

Mitigation Recommendations

As no official fix or patch is currently available, developers using spatie/browsershot should implement their own input validation to block or sanitize file URI schemes in HTML content passed to the setHtml function. Monitoring vendor advisories for updates or patches is recommended.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
snyk
Date Reserved
2025-02-04T10:20:48.623Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a57af5d68715ace430250c1

Added to database: 07/15/2026, 16:03:41 UTC

Last enriched: 08/13/2026, 18:07:16 UTC

Last updated: 09/10/2026, 19:36:49 UTC

Views: 68

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses