---
id: CVE-2026-67434
title: >-
  PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of
  coding standards
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,
  Hgbl…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-78
vendor: Red Hat
product: squizlabs/php_codesniffer
affected:
  - squizlabs/php_codesniffer < 3.13.6
  - 'squizlabs/php_codesniffer >= 4.0.0, < 4.0.2'
patched:
  - squizlabs/php_codesniffer 3.13.6
  - squizlabs/php_codesniffer 4.0.2
published: '2026-08-06'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T20:41:33.140'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-67434'
references:
  - url: >-
      https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/7a3a6bbf153a03fa3a9413afc60bded6b764e76b
    label: security-advisories@github.com
  - url: >-
      https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/f0e1ebb0563f0e5d7f190497a787bcaf8474f3fe
    label: security-advisories@github.com
  - url: 'https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1473'
    label: security-advisories@github.com
  - url: 'https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.13.6'
    label: security-advisories@github.com
  - url: 'https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/4.0.2'
    label: security-advisories@github.com
  - url: >-
      https://github.com/PHPCSStandards/PHP_CodeSniffer/security/advisories/GHSA-hmqg-cxww-wqhq
    label: security-advisories@github.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-67434.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-67434'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-67434'
  - url: >-
      https://github.com/FriendsOfPHP/security-advisories/blob/master/squizlabs/php_codesniffer/CVE-2026-67434.yaml
  - url: 'https://github.com/advisories/GHSA-hmqg-cxww-wqhq'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
  - ghsa
  - composer
epss: 0.01063
epssPercentile: 0.63138
aliases:
  - GHSA-hmqg-cxww-wqhq
ecosystem: composer
cvssSource: vendor
ingestedAt: '2026-08-06T22:05:23.183Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-67434)

Affected packages:

- `squizlabs/php_codesniffer < 3.13.6`
- `squizlabs/php_codesniffer >= 4.0.0, < 4.0.2`

Patched in:

- `squizlabs/php_codesniffer 3.13.6`
- `squizlabs/php_codesniffer 4.0.2`

Source: https://github.com/advisories/GHSA-hmqg-cxww-wqhq

## Vendor advisories

- **Red Hat VEX** · updated 2026-09-09 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-67434.json)
