{"id":"CVE-2026-67434","aliases":["CVE-2026-67434","GHSA-hmqg-cxww-wqhq"],"related":[],"kind":"vulnerability","state":"published","title":"PHP_CodeSniffer gitblame report command injection via crafted filename","summary":"PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. Prior to versions 3.13.6 and 4.0.2, PHP_CodeSniffer contains a command injection vulnerability in the code that generates the Gitblame, Hgblame, and Svnblame report formats. As a result, running PHP_CodeSniffer over untrusted files, for example in a continuous integration pipeline that scans pull requests, or on a developer machine reviewing third party code, could result in attacker controlled shell commands being executed when the Gitblame, Hgblame, or Svnblame report processes a file whose name contains shell metacharacters. Users using the default Full report, or any of the other non-blame reports, are not affected. Users on a runtime platform which does not allow filenames to contain shell metacharacters, such as \" and ;, are not affected. This issue is fixed in versions 3.13.6 and 4.0.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. Prior to versions 3.13.6 and 4.0.2, PHP_CodeSniffer contains a command injection vulnerability in the code that generates the Gitblame, Hgblame, and Svnblame report formats. As a result, running PHP_CodeSniffer over untrusted files, for example in a continuous integration pipeline that scans pull requests, or on a developer machine reviewing third party code, could result in attacker controlled shell commands being executed when the Gitblame, Hgblame, or Svnblame report processes a file whose name contains shell metacharacters. Users using the default Full report, or any of the other non-blame reports, are not affected. Users on a runtime platform which does not allow filenames to contain shell metacharacters, such as \" and ;, are not affected. This issue is fixed in versions 3.13.6 and 4.0.2.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nPHP_CodeSniffer versions before v3.13.6 and v4.0.2 contain a command injection vulnerability in the code creating the `Gitblame`, `Hgblame` and `Svnblame` report(s).\n\nAs a result, running PHP_CodeSniffer over untrusted files, for example, in a CI pipeline that scans pull requests, or on a developer machine reviewing third-party code, could result in attacker-controlled shell commands being executed when the `Gitblame`, `Hgblame` or `Svnblame` report(s) would process a file whose name contains shell metacharacters.\n\n* Users using the default `Full` report, or any of the other non-*blame reports, are not affected.\n* Users on a runtime platform which does not allow filenames to contain shell metacharacters, such as `\"` and `;`, are not affected.\n\n### Patched versions\n\nThe issue has been fixed in PHP_CodeSniffer v3.13.6 and v4.0.2. We recommend all users upgrade to these versions at their earliest convenience.\n\n### Workaround\n\nUsers of PHP_CodeSniffer who cannot upgrade immediately should ensure they do not use the `Gitblame`, `Hgblame` or the `Svnblame` reports when scanning untrusted code.\n\nThis is especially relevant for CI jobs, pre-commit or review tooling, automated review services, and any service that scans untrusted repositories or uploaded source trees.\n\n### Credits\n\nMany thanks to both [@Faze-up](https://github.com/Faze-up) and [@edorian](https://github.com/edorian) for responsibly disclosing this vulnerability.\n\n### How can I report a security bug?\n\nPlease report security vulnerabilities privately via [the \"Security and quality\" tab on the PHP_CodeSniffer repository](https://github.com/PHPCSStandards/PHP_CodeSniffer/security).","format":"markdown","source":"ghsa"},{"lang":"es","text":"PHP_CodeSniffer tokeniza archivos PHP y detecta violaciones de un conjunto definido de estándares de codificación. Antes de las versiones 3.13.6 y 4.0.2, PHP_CodeSniffer contiene una vulnerabilidad de inyección de comandos en el código que genera los formatos de informe Gitblame, Hgblame y Svnblame. Como resultado, ejecutar PHP_CodeSniffer sobre archivos no confiables, por ejemplo en una tubería de integración continua que escanea solicitudes de extracción, o en una máquina de desarrollador revisando código de terceros, podría resultar en la ejecución de comandos de shell controlados por el atacante cuando el informe Gitblame, Hgblame o Svnblame procesa un archivo cuyo nombre contiene metacaracteres de shell. Los usuarios que utilizan el informe Full predeterminado, o cualquiera de los otros informes no-blame, no se ven afectados. Los usuarios en una plataforma de tiempo de ejecución que no permite que los nombres de archivo contengan metacaracteres de shell, como ” y ;, no se ven afectados. Este problema está solucionado en las versiones 3.13.6 y 4.0.2.","source":"nvd"}],"published":"2026-08-06T21:31:32.511Z","modified":"2026-10-24T16:10:00.153Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 3.13.6","status":"affected"},{"version":">= 4.0.0, < 4.0.2","status":"affected"}],"vendor":"PHPCSStandards","product":"PHP_CodeSniffer","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.13.6"}],"ecosystem":"Packagist","package":"squizlabs/php_codesniffer","purl":"pkg:composer/squizlabs/php_codesniffer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.0.2"}],"ecosystem":"Packagist","package":"squizlabs/php_codesniffer","purl":"pkg:composer/squizlabs/php_codesniffer","source":"ghsa"}],"references":[{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/security/advisories/GHSA-hmqg-cxww-wqhq","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1473","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/7a3a6bbf153a03fa3a9413afc60bded6b764e76b","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/f0e1ebb0563f0e5d7f190497a787bcaf8474f3fe","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.13.6","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/4.0.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/squizlabs/php_codesniffer/CVE-2026-67434.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/PHPCSStandards/PHP_CodeSniffer","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-08-07T15:36:31.165Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-67434","url":"https://www.cve.org/CVERecord?id=CVE-2026-67434","licence":"CVE Terms of Use","modified":"2026-08-07T15:37:19.375Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hmqg-cxww-wqhq","url":"https://github.com/advisories/GHSA-hmqg-cxww-wqhq","licence":"CC-BY-4.0","modified":"2026-08-06T21:56:03.572Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-67434","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67434","licence":"Public domain","modified":"2026-10-24T16:10:00.153Z"}],"updatedAt":"2026-11-25T22:59:31.405Z","epss":{"score":0.00769,"percentile":0.5682,"date":"2026-12-01T12:00:22.000Z"}}