CVE-2026-65954: PHPCSUtils · Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()
Affects phpcsstandards/phpcsutilsSource GCVE Database
Not known to be exploited · CVSS 8.6 High : upgrade to 1.2.3 soon.
Data as of 12 Nov 2026, 23:24 UTC
- EPSS
- 0.1% chance of exploitation in 30 days – higher than 4% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.2.3
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 12 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
Upgrade phpcsstandards/phpcsutils to 1.2.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistphpcsstandards/phpcsutils | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in PHPCSUtils version 1.2.3; users should upgrade to this version or later to fully remediate the vulnerability. For those unable to upgrade immediately, disabling the vulnerable sniffs (e.g., Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes) via custom ruleset exclusions is recommended. Verification of disabled sniffs can be done using the 'phpcs -e' command with the custom ruleset. No other mitigations are specified.
Description
PHPCSUtils versions 1.0.0-alpha1 through 1.2.2 contain a remote code execution vulnerability in the method AbstractArrayDeclarationSniff::getActualArrayKey(). This method uses eval() to determine array key values, allowing maliciously crafted array keys to execute arbitrary code on the host running PHPCS. The vulnerability affects any sniff extending AbstractArrayDeclarationSniff that calls this method, including known PHPCSExtra sniffs Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes. The issue is fixed in version 1.2.3. Users unable to upgrade immediately can mitigate by disabling the vulnerable sniffs in their ruleset.
References
- github.com/PHPCSStandards/PHPCSUtils/security/advisories/GHSA-r6hr-vr92-vv28 (opens in a new tab)
- github.com/PHPCSStandards/PHPCSUtils/pull/778 (opens in a new tab)
- github.com/PHPCSStandards/PHPCSUtils/commit/9f596b50ea4498ea57b8cb341e920233b044debf (opens in a new tab)
- github.com/FriendsOfPHP/security-advisories/blob/master/phpcsstandards/phpcsutils/CVE-2026-65954.yaml (opens in a new tab)
- github.com/PHPCSStandards/PHPCSUtils (opens in a new tab)