Skip to main content

Spatie Browsershot CVE-2026-126779

| EUVDEUVD-2026-123773 HIGH
External Control of File Name or Path (CWE-73)
2026-11-11 VulnCheck GHSA-wp7g-f22j-79fp
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted HTML to setHtml()
  2. Delivery
    Embed root-relative path (e.g. /etc/passwd)
  3. Exploit
    Path resolves to file:// URL in Chrome
  4. Execution
    Chrome renders file contents into PDF/screenshot
  5. Impact
    Retrieve output to exfiltrate server files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
Exploitation Conditions

The host application must pass attacker-influenced HTML into Browsershot's setHtml()/html() on an affected version (2.2.0 up to, but not including, 5.5.0), and must return or expose the rendered PDF/screenshot to the attacker so leaked file contents can be read. The specific trigger is HTML containing iframe, img, link or script elements referencing absolute filesystem paths (e.g. /etc/passwd) that resolve to file:// URLs during rendering. Limiting factors: exploitation requires that the integrating application actually feeds untrusted HTML to this sink (htmlFromFilePath()/setHtmlFromFilePath() are out of scope and intentionally render local files), and only files readable by the Chrome process can be exfiltrated. The fix blocks file: requests from supplied HTML by default; applications that legitimately need local assets must opt in via allowLocalFileAccess(), which re-exposes the behavior for trusted HTML only.

Impact

This is a genuine information-disclosure flaw that leaks arbitrary server files, but its real-world priority is tempered by an integration prerequisite the raw CVSS score hides. The input CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, VC:H) scores 8.7 and describes network-reachable, unauthenticated, low-complexity exploitation with high confidentiality impact - consistent with the description, since attacker-supplied HTML into setHtml() needs no credentials against the library itself. However, exploitation is only possible where the host application actually passes untrusted/attacker-influenced HTML into Browsershot and returns the rendered PDF/screenshot to the attacker; the PR:N rating reflects the library's lack of auth, not that every deployment is exposed. No EPSS score is provided in the input, so probabilistic exploitation likelihood cannot be stated. The vulnerability is NOT on CISA KEV and no confirmed exploit code is present in the input (only patch commits and a VulnCheck advisory), so there is no evidence of active exploitation. The vendor-assigned priority is 'this_week' and a patch exists, which together argue for prompt but non-emergency remediation rather than drop-everything urgency.

Exploit ScenarioDerived

An application that generates PDFs or screenshots from user-supplied HTML (e.g. invoice/report rendering) passes that HTML to Browsershot's setHtml(). An attacker submits HTML containing an element such as <iframe src="/etc/passwd"> or <img src="/etc/private.key">; Browsershot (2.2.0 to before 5.5.0) resolves the root-relative path to a file:// URL, and Chrome renders the file's contents into the returned PDF/screenshot, which the attacker then retrieves. No public exploit identified at time of analysis, though the patch diff plainly reveals the mechanism; the low attack complexity and lack of authentication make weaponization straightforward where untrusted HTML reaches the sink.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 11, 2026

Local file read in Spatie Browsershot 2.2.0 through 5.4.x lets an attacker who can influence the HTML handed to setHtml()/html() pull arbitrary server files into the rendered PDF or screenshot. Because that HTML is rendered without a content URL, absolute paths such as /etc/passwd inside iframe, img, link or script elements resolve to file:// URLs that Chrome happily loads, and the file contents then appear in the output the application returns. The practical exposure depends entirely on the integrating application feeding untrusted HTML into this sink; no public exploit code was identified at time of analysis, and a vendor fix ships in 5.5.0, which blocks file: requests from supplied HTML by default.

RemediationAI

Upgrade to Spatie Browsershot 5.5.0 or later (vendor-released patch; release notes at https://github.com/spatie/browsershot/releases/tag/5.5.0, fix merged via https://github.com/spatie/browsershot/pull/989 and commit eba71ab7f4aba23d9321d653ccd19d4e94432516). The patch blocks file: requests originating from HTML supplied to html()/setHtml() by default, including absolute filesystem paths and file URLs generated by JavaScript; be aware of the side effect that PDFs and screenshots which previously pulled in local images or stylesheets will now render with those resources missing. If rendering must continue on an affected version, stop passing untrusted or attacker-influenced HTML into html()/setHtml() and strip iframe, img, link and script references to absolute paths before rendering - note that this is a fragile application-level filter because the bypass surface is any markup that resolves to a file: URL. Do not reach for allowLocalFileAccess() as a workaround: it re-enables reading any local file the Chrome process can access and is intended only for HTML you fully trust. Where untrusted content must be rendered, the vendor recommends isolating the browser's filesystem and network access, since blocking local files does not prevent requests to internal HTTP services.

Affected VersionsENISA

Browsershot 2.2.0 <5.5.0

Affected Packages

euvd browsershot fix: 5.5.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Browsershot is a PHP wrapper around headless Chrome, driving Puppeteer through the Node helper script bin/browser.cjs. The flaw is CWE-73 (External Control of File Name or Path): HTML passed to setHtml() used to be screened against a list of unsafe protocols, but file: was explicitly excluded from that check, so markup referencing root-relative or absolute filesystem paths was passed straight to the browser. When HTML is rendered without a content URL, a path like /etc/passwd is resolved as a file:// reference and Chrome reads it off the local filesystem; the contents are then painted into the resulting PDF, screenshot or HTML evaluation and returned to the caller. The upstream fix (PR #989, commit eba71ab7f4aba23d9321d653ccd19d4e94432516, released in 5.5.0) moves enforcement out of the PHP string check and into Chrome request interception in bin/browser.cjs: a blockLocalFileAccess flag aborts any file: request except the single initial main-frame navigation to Browsershot's own temporary HTML file, which also shuts down file URLs constructed at runtime by JavaScript. The PHP side now only rejects view-source and adds allowLocalFileAccess() as an explicit opt-in that restores the old behavior for trusted HTML. The documentation makes clear this is a mitigation of the local-file vector, not a sandbox: it does not stop requests to internal HTTP services.

Know when Browsershot gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Library imposes no authentication and the sink is low-complexity to reach once untrusted HTML is accepted (PR:N/AC:L); impact is arbitrary local file read so C:H, with no integrity or availability effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Spatie Browsershot 2.2.0 before 5.5.0 contains a local file read vulnerability that allows attackers to read server files by supplying root-relative references in HTML passed to setHtml(). Attackers can embed iframe, img, link or script elements referencing paths like /etc/passwd, which resolve to file:// URLs and render file contents into the returned PDF or screenshot.

Executive ViewAI

Why It Matters

A high-severity flaw in the Spatie Browsershot library (versions 2.2.0 through 5.4.x) could allow an attacker to read sensitive files from the server if the application passes untrusted HTML to the library's rendering functions. This poses a significant risk to data confidentiality and could lead to regulatory exposure, especially for any product or service that generates PDFs or screenshots from user-supplied content.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular Laravel/PHP PDF-and-screenshot library, broadly used but not universal
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy