
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-65954 is an eval injection vulnerability in PHPCSUtils (GHSA-r6hr-vr92-vv28) that allows arbitrary code execution on the host running PHP_CodeSniffer scans. The flaw exists in PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey(), which uses eval() to evaluate array key expressions found in scanned PHP code. Affected versions span from 1.0.0-alpha1 through 1.2.2 (inclusive); version 1.2.3 contains the fix. It carries a CVSS v3.1 base score of 8.6 (High) (Github Advisory, PHPCSUtils Advisory).
The root cause is CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code — 'Eval Injection'): the getActualArrayKey() method passes attacker-controlled array key expressions directly to PHP's eval() without sanitization, enabling execution of arbitrary PHP and OS-level commands (Github Advisory). The attack vector is local (the malicious code must be present in a file scanned by PHPCS), requires no privileges, but does require user interaction (a developer or CI system must trigger a scan). Known reachable code paths include the PHPCSExtra sniffs Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes; any other sniff extending AbstractArrayDeclarationSniff and calling getActualArrayKey() is also affected (PHPCSUtils Advisory). The fix (commit e8648633) introduces a $callbackIndicators token list and bails out of eval() processing whenever a callback-format function call is detected in an array key (PHPCSUtils Commit).
Successful exploitation allows an unauthenticated attacker to execute arbitrary OS commands with the privileges of the process running PHPCS — typically a developer account or a CI/CD service account — resulting in full confidentiality, integrity, and availability compromise of the scanning host (Github Advisory). The scope is marked as Changed, meaning the impact extends beyond the vulnerable component itself; a compromised CI pipeline could enable lateral movement into build infrastructure, secret stores, or deployment environments. A concrete example payload is 'system'('id') used as an array key, which executes the id command when the file is scanned (PHPCSUtils Advisory).
No public proof-of-concept exploit code is known to exist, and there is no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.215% (11th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is not automatable — it requires a victim to scan a maliciously crafted PHP file — but the attack is trivially simple once a target scans attacker-controlled code (e.g., via a pull request in a CI pipeline).
<?php
$arr = [
'system'('id') => 'value',
];getActualArrayKey() (e.g., Universal.Arrays.DuplicateArrayKey or Universal.Arrays.MixedArrayKeyTypes).phpcs against the submitted file. The scan invokes AbstractArrayDeclarationSniff::getActualArrayKey(), which passes the array key expression to eval().eval() call executes 'system'('id') (or any other OS command), running arbitrary commands on the scanning host with the privileges of the PHPCS process — enabling data exfiltration, reverse shell establishment, or further lateral movement within the CI/CD environment (PHPCSUtils Advisory, PHPCSUtils Commit).sh, bash, id, curl, wget, python) during a code scan.eval() execution errors in AbstractArrayDeclarationSniff.Upgrade PHPCSUtils to version 1.2.3 or later, which resolves the vulnerability by preventing eval() from processing callback-format array keys (PHPCSUtils Release). As a temporary workaround for those unable to upgrade immediately, disable the vulnerable sniffs by adding <exclude name="Universal.Arrays.DuplicateArrayKey"/> and <exclude name="Universal.Arrays.MixedArrayKeyTypes"/> (and any other sniffs calling getActualArrayKey()) to your custom PHPCS ruleset; verify exclusion with phpcs -e --standard=/path/to/ruleset.xml (PHPCSUtils Advisory). Additionally, avoid scanning untrusted or third-party PHP code with vulnerable versions of PHPCSUtils, particularly in automated CI pipelines that process pull requests from external contributors.
The vulnerability was responsibly disclosed by researcher @rodrigoprimo and fixed by maintainer @jrfnl, with @edorian serving as remediation reviewer (PHPCSUtils Advisory). The release notes for version 1.2.3 explicitly label it a security release and advise all users to update as soon as possible (PHPCSUtils Release). No significant broader media coverage or notable social media commentary beyond standard vulnerability database aggregation has been observed.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."