{"answers":{"affected":"2 open source packages ship an affected version, including pontedilana/php-weasyprint.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49260 exists.","fix":"Upgrade pontedilana/php-weasyprint to 2.5.1 or later.","what":"CVE-2026-49260 is a high-severity command injection vulnerability in pontedilana php-weasyprint, published on 19 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-49260 and fix it if it is affected.\n\nWhat it is: CVE-2026-49260 is a high-severity command injection vulnerability in pontedilana php-weasyprint, published on 19 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49260 exists.\n\nAffected packages and fixed versions:\n- pontedilana/php-weasyprint (Packagist): affected all versions; fixed in 2.5.1\n- pontedilana/php-weasyprint (Packagist): affected all versions; fixed in 2.5.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-49260/ (Markdown: https://insights.sbomify.com/CVE-2026-49260/index.md)","id":"CVE-2026-49260","markdown":"https://insights.sbomify.com/CVE-2026-49260/index.md","name":"CVE-2026-49260","record":{"aliases":["GHSA-f5gc-qxf8-mh9g"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"PHP PDF generation library","requires_auth":"high_privilege","summary":"Attackers can execute arbitrary shell commands if the WeasyPrint binary path is configurable, due to a flawed executable check.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"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('/usr/local/bin/weasyprint')` returns `'/usr/local/bin/weasyprint'` 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 \"safe\" branch is dead code, and the raw `$binary` string (set via the constructor or `setBinary()`) flows directly into `Symfony\\Component\\Process\\Process::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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"php-weasyprint: shell command injection via configurable WeasyPrint binary path due to inverted is_executable() guard (mirror of KnpLabs/snappy GHSA-vpr4-p6fq-85jc)","id":"CVE-2026-49260","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"MariaDB server has unsafe parameter handling in `wsrep_notify_cmd`","id":"CVE-2026-49261"},"packages":[{"ecosystem":"Packagist","fixed":["2.5.1"],"introduced":["0"],"last_affected":[],"package":"pontedilana/php-weasyprint","purl":null,"source":"GHSA-f5gc-qxf8-mh9g"},{"ecosystem":"Packagist","fixed":["2.5.1"],"introduced":["0"],"last_affected":[],"package":"pontedilana/php-weasyprint","purl":"pkg:composer/pontedilana/php-weasyprint","source":"GHSA-f5gc-qxf8-mh9g"}],"prev":{"headline":"Nebula Mesh: Web UI lacks ownership checks, enabling cross-operator access to hosts and networks (read, block, delete)","id":"CVE-2026-49258"},"products":["php-weasyprint"],"published":"2026-06-19","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-22","vendors":["pontedilana"]},"summary":"Attackers can execute arbitrary shell commands if the WeasyPrint binary path is configurable, due to a flawed executable check.","url":"https://insights.sbomify.com/CVE-2026-49260/"}