BuzzPHP
LightDarkSystem

PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

High severity. Published 29 September 2026. Update phpcsstandards/phpcsutils to 1.2.3 or later: composer update phpcsstandards/phpcsutils.

Which versions are affected?

PackageAffected versionsFixed in
phpcsstandards/phpcsutils (opens in a new tab)>= 1.0.0-alpha1, < 1.2.31.2.3

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show phpcsstandards/phpcsutils
composer audit

Advisory details

SeverityHighCVSS 8.6
Published
Updated
CVECVE-2026-65954 (opens in a new tab)
GHSAGHSA-r6hr-vr92-vv28 (opens in a new tab)
WeaknessCWE-95

What the advisory says

Impact

PHPCSUtils versions 1.0.0-alpha1 through 1.2.2 contain an arbitrary code execution vulnerability in PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey(). The vulnerable method is reached by any sniff that extends AbstractArrayDeclarationSniff and calls getActualArrayKey().

Running PHPCS over untrusted PHP code through such a sniff, for example, in a CI pipeline that lints pull requests, or on a developer machine reviewing third-party code, could lead to arbitrary command execution on the scanning host.

The vulnerability happens when the method determines the value of an array key using eval().

Source: GHSA-r6hr-vr92-vv28 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

All Composer security advisories