BuzzPHP
LightDarkSystem

PHP_CodeSniffer gitblame report command injection via crafted filename

High severity. Published 6 August 2026. Update squizlabs/php_codesniffer to the fixed version of your branch (3.13.6, 4.0.2): composer update squizlabs/php_codesniffer.

Which versions are affected?

PackageAffected versionsFixed in
squizlabs/php_codesniffer (opens in a new tab)< 3.13.6 | >= 4.0.0, < 4.0.23.13.6, 4.0.2

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show squizlabs/php_codesniffer
composer audit

Advisory details

SeverityHigh
Published
Updated
CVECVE-2026-67434 (opens in a new tab)
GHSAGHSA-hmqg-cxww-wqhq (opens in a new tab)
WeaknessCWE-78

What the advisory says

Impact

PHPCodeSniffer 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).

As a result, running PHPCodeSniffer 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.

Users using the default Full report, or any of the other non-blame reports, are not affected.

Source: GHSA-hmqg-cxww-wqhq (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

All Composer security advisories