[ CVE-2026-65954 · Published 12 Oct 2026 ]
PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()
CVSS 8.6
EPSS <1%Fix available
[ Description ]Official 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.
[ Fixes ]Fixes and patches
- phpcsstandards/phpcsutils 1.2.3Fixed version · GitHub Advisories · composer package phpcsstandards/phpcsutils: upgrade to 1.2.3 or later (affected >= 1.0.0-alpha1, < 1.2.3)
[ Packages ]Affected open-source packages
- phpcsstandards/phpcsutils composerAffected >= 1.0.0-alpha1, < 1.2.3 · fixed in 1.2.3 · GHSA-r6hr-vr92-vv28