CVE-2026-67434: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in PHPCSStandards PHP_CodeSniffer
PHP_CodeSniffer versions prior to 3.13.6 and 4.0.2 contain a command injection vulnerability in the code generating Gitblame, Hgblame, and Svnblame report formats. This vulnerability allows attacker-controlled shell commands to be executed if a file name contains shell metacharacters and is processed by these blame report formats. Users running default or other non-blame reports, or on platforms that disallow such filenames, are not affected. The issue is fixed in versions 3.13.6 and 4.0.2.
AI Analysis
Technical Summary
PHP_CodeSniffer is vulnerable to OS command injection in versions before 3.13.6 and 4.0.2 due to improper neutralization of special elements in file names when generating Gitblame, Hgblame, and Svnblame report formats. This vulnerability arises when processing files with names containing shell metacharacters, potentially allowing execution of arbitrary shell commands. The vulnerability does not affect other report formats or platforms that restrict such filenames. The flaw is addressed in PHP_CodeSniffer versions 3.13.6 and 4.0.2.
Potential Impact
An attacker who can control file names containing shell metacharacters and cause PHP_CodeSniffer to generate blame reports can execute arbitrary shell commands on the system running PHP_CodeSniffer. This could lead to unauthorized command execution with the privileges of the user running the tool. The impact is limited to scenarios where blame reports are generated on untrusted files with crafted filenames. Default report users and those on restrictive platforms are not impacted.
Mitigation Recommendations
Upgrade PHP_CodeSniffer to version 3.13.6 or later, or 4.0.2 or later, where this vulnerability is fixed. Avoid running blame report formats (Gitblame, Hgblame, Svnblame) on untrusted files with potentially malicious filenames. Users on platforms that do not allow shell metacharacters in filenames are not affected. Patch status is confirmed fixed in these versions.
CVE-2026-67434: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in PHPCSStandards PHP_CodeSniffer
Description
PHP_CodeSniffer versions prior to 3.13.6 and 4.0.2 contain a command injection vulnerability in the code generating Gitblame, Hgblame, and Svnblame report formats. This vulnerability allows attacker-controlled shell commands to be executed if a file name contains shell metacharacters and is processed by these blame report formats. Users running default or other non-blame reports, or on platforms that disallow such filenames, are not affected. The issue is fixed in versions 3.13.6 and 4.0.2.
CVSS v4.0
Score 7.3high
Affected software
PHPCSStandards
PHP_CodeSniffer
pkg:github/phpcsstandards/PHP_CodeSnifferRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PHP_CodeSniffer is vulnerable to OS command injection in versions before 3.13.6 and 4.0.2 due to improper neutralization of special elements in file names when generating Gitblame, Hgblame, and Svnblame report formats. This vulnerability arises when processing files with names containing shell metacharacters, potentially allowing execution of arbitrary shell commands. The vulnerability does not affect other report formats or platforms that restrict such filenames. The flaw is addressed in PHP_CodeSniffer versions 3.13.6 and 4.0.2.
Potential Impact
An attacker who can control file names containing shell metacharacters and cause PHP_CodeSniffer to generate blame reports can execute arbitrary shell commands on the system running PHP_CodeSniffer. This could lead to unauthorized command execution with the privileges of the user running the tool. The impact is limited to scenarios where blame reports are generated on untrusted files with crafted filenames. Default report users and those on restrictive platforms are not impacted.
Mitigation Recommendations
Upgrade PHP_CodeSniffer to version 3.13.6 or later, or 4.0.2 or later, where this vulnerability is fixed. Avoid running blame report formats (Gitblame, Hgblame, Svnblame) on untrusted files with potentially malicious filenames. Users on platforms that do not allow shell metacharacters in filenames are not affected. Patch status is confirmed fixed in these versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-29T15:07:24.991Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a75070abf8831d5395f5c06
Added to database: 08/06/2026, 22:13:30 UTC
Last enriched: 08/14/2026, 16:14:25 UTC
Last updated: 09/21/2026, 22:01:36 UTC
Views: 29
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.