Skip to content

CVE-2026-65954 PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

HighCVSS 8.6 EPSS 0.16% PoC
Published
Updated
Exploit status
Proof-of-concept only
CISA SSVC
No known exploitation · automatable: no · technical impact: total
Technology
PHP

Description

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.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
phpcsstandards/phpcsutils(Packagist) = 1.0.0; = 1.0.0-alpha1; = 1.0.0-alpha2; = 1.0.0-alpha3 +22 more 1.2.3 Fixed
phpcsstandards/phpcsutils = >= 1.0.0-alpha1, <= 1.2.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
phpcsstandards/phpcsutils(Packagist) >= 1.0.0-alpha1, < 1.2.3 1.2.3
phpcsstandards/phpcsutils(Packagist) = 1.0.0 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.0-alpha1 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.0-alpha2 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.0-alpha3 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.0-alpha4 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.0-rc1 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.1 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.10 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.11 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.12 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.2 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.3 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.4 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.5 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.6 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.7 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.8 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.0.9 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.1.0 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.1.1 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.1.2 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.1.3 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.2.0 No fix listed
phpcsstandards/phpcsutils(Packagist) = 1.2.1 No fix listed
Show 2 more
ProductAffected versionsFixed in
phpcsstandards/phpcsutils(Packagist) = 1.2.2 No fix listed
phpcsstandards/phpcsutils = >= 1.0.0-alpha1, <= 1.2.2 No fix listed

References