# CVE-2026-46643: Snappy: Binary path is never shell-escaped due to an inverted is_executable check

- Severity: High 7.5 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-21T20:22:16.000Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-vpr4-p6fq-85jc
- Related: CVE-2026-49260
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- KnpLabs snappy: < 1.7.1
- KnpLabs/knp-snappy (Packagist): before 1.7.1

## Every score

- GitHub_M: CVSS:4.0 7.5 High `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/KnpLabs/snappy/security/advisories/GHSA-vpr4-p6fq-85jc> (exploit, web)
- <https://github.com/KnpLabs/snappy/releases/tag/v1.7.1> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-46643> (advisory)
- <https://github.com/KnpLabs/snappy> (package)

## Sources

- CVE List: [CVE-2026-46643](https://www.cve.org/CVERecord?id=CVE-2026-46643), CVE Terms of Use, modified 2026-06-11
- GitHub Advisory Database: [GHSA-vpr4-p6fq-85jc](https://github.com/advisories/GHSA-vpr4-p6fq-85jc), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-46643](https://nvd.nist.gov/vuln/detail/CVE-2026-46643), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-46643 · Whole record: https://cve.day/CVE-2026-46643.json · Rebuilt by cve.day 2026-11-25T22:59:24.361Z
