Command injectionin KnpLabs snappy.
Proof of concept public (CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks. assessment).
Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Prior to version 1.7.1, on POSIX, escapeshellarg(‘/usr/bin/wkhtmltopdf’) returns the literal string ‘/usr/bin/wkhtmltopdf’ with the single-quote characters included. is_executable() then looks for a file whose actual name contains those quote characters, which essentially never exists. The safe branch is dead code and $command always falls through to the raw, unescaped value. The rest of the arguments (options, input, output) are escaped correctly, so injection has to land in the binary string itself. That happens whenever the binary path is sourced from configuration that is user-influenced, derived from environment variables that ultimately come from request data, or concatenated with any user-controlled fragment. This issue has been patched in version 1.7.1.
- Upgrade snappy to 1.7.1 or later.
- Upgrade KnpLabs/knp-snappy (Packagist) to 1.7.1 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 15 May 2026CVE ID reserved by GitHub_M.
- 10 Jun 2026Published in the CVE List.
- 11 Jun 2026CVE record last updated.
Attack code anyone can find
Exploit maturity: Proof of concept (CISA assessment). CISA assessment (SSVC): exploitation poc.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other snappy vulnerabilities
Same weakness: OS command injection
- github.com x_refsource_CONFIRM
- github.com x_refsource_MISC
Patchminder. CVE-2026-46643: Command injection in KnpLabs snappy. https://patchminder.com/cve/cve-2026-46643/ (accessed 5 December 2026).