Beganovich snappdf: OS command injection on Windows via setUrl()
Summary
snappdf is a PHP library that converts web pages and HTML into PDF files using a Chromium browser. On Windows, versions from 1.1.0 before 6.1.0 pass the URL set with setUrl() unescaped to exec(), so cmd.exe metacharacters such as & in the URL can run arbitrary commands. An attacker can exploit this if an application lets users influence the rendered URL, and the commands run with the privileges of the PHP process.
Affected
- beganovich/snappdf from 1.1.0 before 6.1.0
- Only Windows hosts are described as affected; Linux and macOS are not.
Fixed in
- Version 6.1.0 (fix via PR #54, commit 5197bd3)
Workaround
- No vendor-documented workaround.
- Until patched: do not pass user-supplied URLs to the renderer on Windows hosts, run the PHP service with a low-privilege account, and restrict outbound traffic from the web server.
Exploitation
- No known exploitation in the wild.
- No public proof of concept found.
- CISA SSVC: exploitation none, automatable no, technical impact total.
- The fix is public in the repository, so the patch diff is available to attackers.
Our recommendation
- Check composer.lock files for beganovich/snappdf below 6.1.0, especially on Windows hosts.
- Upgrade to 6.1.0 or later and verify the installed version.
- Review whether any internet-facing endpoint accepts URLs that reach the renderer.
- Monitor web server and PHP logs for unusual command execution.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- CVE-Eintrag Beganovich snappdf (VulnCheck advisory) www.vulncheck.com
- Release v6.1.0 github.com
- Fix commit 5197bd3 github.com
- Pull Request #54 github.com
- Vulnerable code v6.0.0 Snappdf.php github.com
- VulDB entry vuldb.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 04:35.
Original description (NVD)
Beganovich snappdf from 1.1.0 before 6.1.0 contains an OS command injection vulnerability on Windows that allows attackers to run commands by influencing the rendered URL. Attackers can supply cmd.exe metacharacters such as & in the setUrl() value, which executeOnWindows() passes unescaped to PHP exec(), executing commands as the PHP process.
NVD references (5)
- https://github.com/beganovich/snappdf/blob/v6.0.0/src/Snappdf.php#L280-L284
- https://github.com/beganovich/snappdf/commit/5197bd3bcc4df44e17246dbceea9ce51eb390eae
- https://github.com/beganovich/snappdf/pull/54
- https://github.com/beganovich/snappdf/releases/tag/v6.1.0
- https://www.vulncheck.com/advisories/beganovich-snappdf-1.1.0-before-6.1.0-os-command-injection-on-windows-vi…
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
