CVE-2026-65954 Details
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.
A vulnerability exists in PHPCSUtils versions 1.0.0-alpha1 prior to 1.2.3, specifically within the AbstractArrayDeclarationSniff class. The issue arises in the getActualArrayKey() method, which evaluates array key expressions using eval(). This behavior enables the execution of arbitrary commands on the host machine during PHP_CodeSniffer scans, particularly when the 'code under scan' includes function calls in array keys. The vulnerability is present in any sniff that extends AbstractArrayDeclarationSniff and calls this method, with known exploitation paths including PHPCSExtra sniffs that handle arrays.
Users are advised to upgrade to PHPCSUtils version 1.2.3 or later. For those unable to upgrade immediately, sniffs that reach the vulnerable method can be disabled by adding exclude tags to the custom ruleset.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 12, 2026CISA-ADP
Assessed Oct 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/PHPCSStandards/PHPCSUtils/commit/e8648633ff5b8219b1b3e6346ce85abfc30f1429 | [email protected] | Source CodeVendor |
| https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.2.3 | [email protected] | Release NotesVendor |
| https://github.com/PHPCSStandards/PHPCSUtils/security/advisories/GHSA-r6hr-vr92-vv28 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-95 | Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| PHPCSStandards PHPCSUtils | >= 1.0.0-alpha1, < 1.2.3 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 13, 2026 | CVE Modified | CISA-ADP |
| Oct 12, 2026 | New CVE Received | [email protected] |
Volerion