---
id: CVE-2026-65954
title: PHPCSUtils is a suite of utility functions for use with PHP_CodeSniffer
summary: >-
  PHPCSUtils is a suite of utility functions for use with PHP_CodeSniffer. From
  1.0.0-alpha1 until 1.2.3,
  PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey()
  evaluates attacker-controlled array-key expressions with…
severity: high
cvss: 8.6
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H'
cwe:
  - CWE-95
vendor: phpcsstandards
product: phpcsstandards/phpcsutils
affected:
  - 'phpcsstandards/phpcsutils >= 1.0.0-alpha1, < 1.2.3'
patched:
  - phpcsstandards/phpcsutils 1.2.3
published: '2026-10-12'
updated: '2026-10-16'
sourceUpdated: '2026-10-16T20:04:29.760'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-65954'
references:
  - url: >-
      https://github.com/PHPCSStandards/PHPCSUtils/commit/e8648633ff5b8219b1b3e6346ce85abfc30f1429
    label: security-advisories@github.com
  - url: 'https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.2.3'
    label: security-advisories@github.com
  - url: >-
      https://github.com/PHPCSStandards/PHPCSUtils/security/advisories/GHSA-r6hr-vr92-vv28
    label: security-advisories@github.com
  - url: 'https://github.com/PHPCSStandards/PHPCSUtils/pull/778'
  - url: >-
      https://github.com/PHPCSStandards/PHPCSUtils/commit/9f596b50ea4498ea57b8cb341e920233b044debf
  - url: >-
      https://github.com/FriendsOfPHP/security-advisories/blob/master/phpcsstandards/phpcsutils/CVE-2026-65954.yaml
  - url: 'https://github.com/advisories/GHSA-r6hr-vr92-vv28'
tags:
  - nvd
  - ghsa
  - composer
  - cve.org
epss: 0.00155
epssPercentile: 0.04621
aliases:
  - GHSA-r6hr-vr92-vv28
ecosystem: composer
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-10-13T16:00:20.413719Z'
ingestedAt: '2026-09-29T18:42:35.833Z'
---

## Overview

PHPCSUtils is a suite of utility functions for use with PHP_CodeSniffer. From 1.0.0-alpha1 until 1.2.3, PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey() evaluates attacker-controlled array-key expressions with eval(), allowing callback-form keys in untrusted PHP code scanned by an extending sniff to execute arbitrary commands on the scanning host. Known reachable paths include Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes. This issue is fixed in version 1.2.3.

## Remediation

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

## Package advisory (CVE-2026-65954)

Affected packages:

- `phpcsstandards/phpcsutils >= 1.0.0-alpha1, < 1.2.3`

Patched in:

- `phpcsstandards/phpcsutils 1.2.3`

Source: https://github.com/advisories/GHSA-r6hr-vr92-vv28
