{"id":80799,"date":"2026-06-19T20:29:01","date_gmt":"2026-06-19T16:59:01","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2026-49260-phpweasyprint-shell-command-injection-via-configurable-weasyprint-binary-path-due-to-inverted-is_executable-guard-mirror-of-knplabs-snappy-ghsa-vpr4-p6fq-85jc\/"},"modified":"2026-06-19T20:29:01","modified_gmt":"2026-06-19T16:59:01","slug":"cve-2026-49260-phpweasyprint-shell-command-injection-via-configurable-weasyprint-binary-path-due-to-inverted-is_executable-guard-mirror-of-knplabs-snappy-ghsa-vpr4-p6fq-85jc","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2026-49260-phpweasyprint-shell-command-injection-via-configurable-weasyprint-binary-path-due-to-inverted-is_executable-guard-mirror-of-knplabs-snappy-ghsa-vpr4-p6fq-85jc\/","title":{"rendered":"CVE-2026-49260 &#8211; PhpWeasyPrint: shell command injection via configurable WeasyPrint binary path due to inverted is_executable() guard (mirror of KnpLabs\/snappy GHSA-vpr4-p6fq-85jc)"},"content":{"rendered":"<p>CVE ID :CVE-2026-49260<\/p>\n<p>  Published : June 19, 2026, 4:59 p.m. | 44\u00a0minutes ago<\/p>\n<p>  Description :PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.5.1, `pontedilana\/php-weasyprint` builds the shell command for WeasyPrint by passing the binary path through `escapeshellarg()` first and then checking the *quoted* result with `is_executable()`. On POSIX `escapeshellarg(&#8216;\/usr\/local\/bin\/weasyprint&#8217;)` returns `&#8217;\/usr\/local\/bin\/weasyprint&#8217;` with the single-quote characters as part of the string, so `is_executable()` looks for a file whose actual name includes those quotes. That file never exists, the &#8220;safe&#8221; branch is dead code, and the raw `$binary` string (set via the constructor or `setBinary()`) flows directly into `SymfonyComponentProcessProcess::fromShellCommandline()`. Any deployment whose binary path is sourced from configuration, an environment variable, or a per-tenant setting reaches a shell-command-injection sink. The library is documented as a one-to-one substitute for KnpLabs\/snappy and inherited the exact pre-fix codepath KnpLabs patched in GHSA-vpr4-p6fq-85jc. PhpWeasyPrint version 2.5.1 contains a patch for the issue.<\/p>\n<p>  Severity: 0.0 | NA<\/p>\n<p>  Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID :CVE-2026-49260 Published : June 19, 2026, 4:59 p.m. | 44\u00a0minutes ago Description :PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.5.1, `pontedilana\/php-weasyprint` builds the shell command for WeasyPrint by passing the binary path through `escapeshellarg()` first and then checking the *quoted* result with &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-80799","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/80799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=80799"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/80799\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=80799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=80799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=80799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}