# PHP_CodeSniffer gitblame report command injection via crafted filename

High severity, published 2026-08-06. Update squizlabs/php_codesniffer to the fixed version of your branch (3.13.6, 4.0.2): composer update squizlabs/php_codesniffer.

Canonical URL: https://buzzphp.com/security/ghsa-hmqg-cxww-wqhq · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high |
| Published | 2026-08-06 |
| Updated | 2026-10-03 |
| CVE | [CVE-2026-67434](https://nvd.nist.gov/vuln/detail/CVE-2026-67434) |
| GHSA | [GHSA-hmqg-cxww-wqhq](https://github.com/advisories/GHSA-hmqg-cxww-wqhq) |
| Weakness | CWE-78 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| squizlabs/php_codesniffer | < 3.13.6 or >= 4.0.0, < 4.0.2 | 3.13.6, 4.0.2 |

## What to do

Update squizlabs/php_codesniffer to the fixed version of your branch (3.13.6, 4.0.2): composer update squizlabs/php_codesniffer.

Check which version you run with `composer show squizlabs/php_codesniffer`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-hmqg-cxww-wqhq on GitHub](https://github.com/advisories/GHSA-hmqg-cxww-wqhq)
- [CVE-2026-67434 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-67434)
- [All Composer security advisories](https://buzzphp.com/security)
