CVE-2025-1022: Input Validation

Published Feb 5, 2025
·
Updated

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.

Affected Software

2 affected componentsFixes available
spatie browsershot<5.0.5
composer/spatie/browsershot<5.0.5
5.0.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/spatie/browsershot to a version that resolves this vulnerability.

    Fixed in 5.0.5
  2. Upgrade

    Upgrade spatie/browsershot to a version that resolves this vulnerability.

    Fixed in 5.0.5
  3. Configuration

    In the input passed to Browsershot::html()/setHtml, add validation to block file URI schemes such as file:// and file:/ so that file:../../../../etc/passwd-style inputs are rejected.

    spatie/browsershot (setHtml / Browsershot::html) Block file URI schemes in HTML input = Disallow file:// and file:/ (also bypass forms like file:../../...)

Event History

Feb 5, 2025
CVE Published
via MITRE·05:00 AM
Data Sourced
via MITRE·05:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 AM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:30 AM

Frequently Asked Questions

1

What is the severity of CVE-2025-1022?

CVE-2025-1022 has been classified as a medium severity vulnerability due to improper input validation.

2

How do I fix CVE-2025-1022?

To fix CVE-2025-1022, upgrade the Spatie Browsershot package to version 5.0.5 or later.

3

What versions are affected by CVE-2025-1022?

Versions of Spatie Browsershot prior to 5.0.5 are affected by CVE-2025-1022.

4

What is the impact of CVE-2025-1022?

CVE-2025-1022 can lead to unauthorized access to sensitive files on the server due to improper input validation.

5

How is CVE-2025-1022 exploited?

CVE-2025-1022 can be exploited by constructing a specific file URI without slashes to bypass input validation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203