CVE-2026-67434: Squizlabs/php codesniffer PHP_CodeSniffer Gitblame Report Command Injection Vulnerability
HIGHCVE-2026-67434 is a HIGH php_codesniffer gitblame report command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Squizlabs/php codesniffer libraries in the Packagist ecosystem. The issue involves php_codesniffer gitblame report command injection via crafted filename. Remediation is available by upgrading affected packages to version 3.13.6, 4.0.2.
CVE-2026-67434 at a Glance
How to Fix CVE-2026-67434
To remediate this vulnerability, upgrade all affected Squizlabs/php codesniffer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade squizlabs/php_codesniffer to 3.13.6
Upgrade squizlabs/php_codesniffer to 4.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for squizlabs/php_codesniffer
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-67434, inspect your project dependencies for Squizlabs/php codesniffer:
inspect dependencies for squizlabs/php_codesniffer
Analyze the terminal output to locate any version of Squizlabs/php codesniffer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.13.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Squizlabs/php codesniffer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-67434 Affected Squizlabs/php codesniffer Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
squizlabs/php_codesniffer
|
Packagist |
< 3.13.6
|
3.13.6
|
|
squizlabs/php_codesniffer
|
Packagist |
≥ 4.0.0
< 4.0.2
|
4.0.2
|
References
Frequently Asked Questions
What is CVE-2026-67434?
Which Squizlabs/php codesniffer versions are affected?
What version fixes CVE-2026-67434?
Is squizlabs/php_codesniffer affected?
What CWE is associated with CVE-2026-67434?
How can I check Packagist dependencies for CVE-2026-67434?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hmqg-cxww-wqhq",
"modified" : "2026-08-06T21:31:34Z",
"published" : "2026-08-06T21:31:34Z",
"aliases" : [ "CVE-2026-67434" ],
"summary" : "PHP_CodeSniffer gitblame report command injection via crafted filename",
"details" : "### 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).",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "squizlabs/php_codesniffer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.13.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "squizlabs/php_codesniffer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/advisories/GHSA-hmqg-cxww-wqhq"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1473"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/7a3a6bbf153a03fa3a9413afc60bded6b764e76b"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/f0e1ebb0563f0e5d7f190497a787bcaf8474f3fe"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/squizlabs/php_codesniffer/CVE-2026-67434.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.13.6"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/4.0.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-06T21:31:34Z",
"nvd_published_at" : null
}
}