CVE-2026-65954 · GHSA-r6hr-vr92-vv28
PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()
- Risk score
- 59/100
- CVSS
- 8.6 v3.1
- Exploit chance (30 days)
- 0.2%
- Published
- 29 Sep 2026
Open in the live forecast Today's forecast
What to know
- What it is
- 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…
- Affected
- phpcsstandards/phpcsutils (composer) >= 1.0.0-alpha1, < 1.2.3
- Fix
- Upgrade phpcsstandards/phpcsutils to 1.2.3 or later.
- Exploitation
- No known exploitation
Why it is Yellow
- CVSS 8.6 high
- On your watchlist: Composer
Affected packages
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
| phpcsstandards/phpcsutils | composer | >= 1.0.0-alpha1, < 1.2.3 | 1.2.3 |
References
- https://github.com/advisories/GHSA-r6hr-vr92-vv28
- https://github.com/PHPCSStandards/PHPCSUtils/security/advisories/GHSA-r6hr-vr92-vv28
- https://github.com/PHPCSStandards/PHPCSUtils/pull/778
- https://github.com/PHPCSStandards/PHPCSUtils/commit/9f596b50ea4498ea57b8cb341e920233b044debf
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpcsstandards/phpcsutils/CVE-2026-65954.yaml
- https://github.com/advisories/GHSA-r6hr-vr92-vv28
- https://github.com/PHPCSStandards/PHPCSUtils/commit/e8648633ff5b8219b1b3e6346ce85abfc30f1429
- https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.2.3
Original 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.
Last activity 29 Sep 2026. Patch Forecast updates every hour.