Vulnerability · Published Oct 12, 2026 · Assigned by GitHub_M
CVE-2026-65954PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()
High 8.6
In plain English
A high-severity security flaw in PHPCSUtils from PHPCSStandards. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | phpcsstandards/phpcsutils | 1.2.3 | GHSA-r6hr-vr92-vv28 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| PHPCSStandards | PHPCSUtils | >= 1.0.0-alpha1, <= 1.2.2 |
Weakness: CWE-95 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H