CVE-2020-7790 is a medium-severity (CVSS 5.3) Path Traversal vulnerability in spatie/browsershot. A fix is available for spatie/browsershot — see the affected versions and patch details below.
browsershot local file inclusion vulnerability
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
spatie/browsershotReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
This affects the package spatie/browsershot from 0.0.0. By specifying a URL in the file:// protocol an attacker is able to include arbitrary files in the resultant PDF.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | spatie/browsershot | all versions | 3.40.1composer require spatie/browsershot:^3.40.1 |
Affected Products
browsershotspatieDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for spatie/browsershot, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update spatie/browsershot to 3.40.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-7790 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is CVE-2020-7790 in your dependencies?
Find it across Packagist, including transitive dependencies.