CVE-2025-1026

8.6 HIGH

📋 TL;DR

CVE-2025-1026 is a local file inclusion vulnerability in spatie/browsershot PHP package versions before 5.0.5. Attackers can bypass URL validation in the setUrl method to read sensitive files on the server. This affects any application using vulnerable versions of the spatie/browsershot library.

💻 Affected Systems

Products:
  • spatie/browsershot
Versions: All versions before 5.0.5
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: This is a bypass of the previous fix for CVE-2024-21549, so systems patched for that CVE but not updated to 5.0.5 remain vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise through reading sensitive files like configuration files, environment variables, SSH keys, or database credentials, potentially leading to full system takeover.

🟠

Likely Case

Unauthorized access to sensitive files containing application secrets, configuration data, or user information, leading to data breach or further exploitation.

🟢

If Mitigated

Limited impact with proper file permissions, web server restrictions, and input validation in place, potentially only exposing non-critical files.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the ability to control input to the setUrl method. The vulnerability bypasses previous validation fixes.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.0.5

Vendor Advisory: https://github.com/spatie/browsershot/commit/e3273974506865a24fbb5b65b534d8d4b8dfbf72

Restart Required: No

Instructions:

1. Update composer.json to require "spatie/browsershot": "^5.0.5"
2. Run composer update spatie/browsershot
3. Verify the update completed successfully
4. Test that browsershot functionality still works as expected

🔧 Temporary Workarounds

Input Validation Wrapper

all

Implement additional URL validation before passing input to browsershot's setUrl method

File Permission Restrictions

all

Restrict web server permissions to prevent reading sensitive files even if LFI occurs

🧯 If You Can't Patch

  • Implement strict input validation to reject any URLs containing file:// scheme or local file paths
  • Restrict web server permissions and implement proper file system access controls

🔍 How to Verify

Check if Vulnerable:

Check composer.lock or run composer show spatie/browsershot to see installed version

Check Version:

composer show spatie/browsershot | grep versions

Verify Fix Applied:

Verify version is 5.0.5 or higher and test that file:// URLs are properly rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns
  • Requests with file:// URLs or local paths in parameters
  • Failed attempts to access restricted files

Network Indicators:

  • HTTP requests containing file:// scheme in URL parameters

SIEM Query:

source="web_logs" AND (url="*file://*" OR parameters="*file://*")

🔗 References

📤 Share & Export