Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit malicious PHP with crafted array key
-
DeliveryCI/dev runs PHPCS with vulnerable sniff
-
ExploitgetActualArrayKey() passes key to eval()
-
ExecutionArbitrary command executes on scanning host
-
ImpactCompromise CI runner / developer machine
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the host to run PHP_CodeSniffer over attacker-supplied/untrusted PHP source using a sniff that extends AbstractArrayDeclarationSniff and calls getActualArrayKey() - concretely, PHPCSExtra's Universal.Arrays.DuplicateArrayKey or Universal.Arrays.MixedArrayKeyTypes sniffs, on PHPCSUtils >=1.0.0-alpha1 and <1.2.3. The limiting factors are: the vulnerable/triggering sniffs must be enabled in the active ruleset (UI:R - a person or pipeline must actively invoke the scan), and the attacker must be able to get their PHP code onto the scanning host (e.g. an untrusted PR in CI or third-party code reviewed on a developer machine). Teams that only lint their own trusted code, or that have excluded the triggering sniffs via <exclude> ruleset tags, are not realistically exposed. |
| Impact | This is a genuine high-severity issue but its real-world exploitability is meaningfully narrower than the 8.6 base score suggests. The CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H) yields full CIA impact with a scope change - accurate for what eval()-based CWE-95 code injection does once triggered: arbitrary command execution on the scanning host. However, AV:L plus UI:R correctly captures the practical gate: the malicious PHP must already be present on the host and a human/pipeline must actively run PHPCS over it with a triggering sniff. There is no EPSS score, no CISA KEV listing, and no public exploit code identified at time of analysis, so this is 'no public exploit identified' - do not treat it as actively exploited. The threat model is essentially supply-chain/CI: linting untrusted pull requests or third-party code. The eval() primitive is trivial to weaponize (AC:L, PR:N - no auth needed because the attacker only supplies the code being scanned), so despite the low prevalence of active exploitation, teams running PHPCS on attacker-controlled code in CI should prioritize the upgrade. Net: real priority for CI/lint-farm operators, lower urgency for teams that only lint their own trusted code. |
| Exploit ScenarioDerived | An attacker opens a pull request (or publishes a package) containing PHP with a crafted array key such as ['system'('id') => 1]. A CI pipeline or developer runs PHPCS with PHPCSExtra's Universal.Arrays.DuplicateArrayKey or MixedArrayKeyTypes sniff, which calls getActualArrayKey(); the key is passed to eval() and the embedded command executes on the scanning host under the CI/developer's privileges. No proof-of-concept exploit is publicly available at time of analysis, but the malicious-key technique is described explicitly in the advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 29, 2026
Arbitrary PHP code execution on the scanning host is possible with PHPCSUtils versions 1.0.0-alpha1 through 1.2.2, because the abstract sniff helper AbstractArrayDeclarationSniff::getActualArrayKey() resolves array-key values through eval() instead of a safe parser. Exploitation requires a host to run PHP_CodeSniffer over attacker-supplied PHP source with a sniff that extends AbstractArrayDeclarationSniff and calls getActualArrayKey() - most notably PHPCSExtra's Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes - which is exactly the situation in CI pipelines that lint untrusted pull requests or on developer machines reviewing third-party code; the crafted key 'system'('id') is evaluated during the scan. The CVSS 3.1 vector scores this 8.6 (AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H), indicating no privileges are required but that the vector is local and needs a person or pipeline to actively invoke the scan; no public exploit code has been identified at time of analysis, and the vendor has released a fix in 1.2.3.
RemediationAI
Vendor-released patch: PHPCSUtils 1.2.3 - upgrade with composer require --dev phpcsstandards/phpcsutils:^1.2.3 (or update the constraint and run composer update phpcsstandards/phpcsutils) and confirm the resolved version is 1.2.3 or later; the fix is delivered by PR #778 / commit 9f596b50ea4498ea57b8cb341e920233b044debf and detailed in advisory GHSA-r6hr-vr92-vv28. Where an immediate upgrade is not possible, the vendor's documented workaround is to stop the triggering sniffs from running by adding exclusion tags to the custom ruleset, for example <rule ref="Universal"><exclude name="Universal.Arrays.DuplicateArrayKey"/><exclude name="Universal.Arrays.MixedArrayKeyTypes"/></rule>, and then verifying the exclusions took effect with phpcs -e --standard=/path/to/ruleset.xml, which lists the sniffs a standard will execute - the excluded sniffs must no longer appear. The trade-off is the loss of duplicate-array-key and mixed-array-key-type detection, so any suppression should be tracked and reverted once 1.2.3 is deployed; likewise, if a downstream package calls getActualArrayKey() through its own sniff, that sniff must be identified and excluded as well. Secondary compensating controls, given the AV:L/UI:R vector: avoid running PHPCS with vulnerable rulesets against untrusted or third-party PHP (gate or sandbox CI lint jobs so PR-supplied code is scanned in an isolated, low-privilege runner without credentials or network reach, and review third-party code in a disposable environment) - these reduce blast radius but do not remove the eval() sink, so they are not a substitute for upgrading.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PHPCSUtils is a Composer library (CPE pkg:composer/phpcsstandards_phpcsutils) that supplies reusable base classes for PHP_CodeSniffer (PHPCS) sniffs; downstream standards such as PHPCSExtra build their sniffs on top of it. The root cause is CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code / 'Eval Injection'): within PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey(), the method needs the literal value of an array key it encounters while tokenizing scanned files, and it computes that value by passing the key expression to eval() rather than resolving only statically-known literals. As a result, any array key in the scanned source that is a valid PHP expression - for example a callable string invoked as 'system'('id') - is executed as PHP in the context of the scanning process whenever an inheriting sniff invokes getActualArrayKey(). The vulnerable code path is reachable only through sniffs that both extend AbstractArrayDeclarationSniff and call that method, which is why the impact propagates to the consuming ruleset (PHPCSExtra's Universal.Arrays.DuplicateArrayKey and Universal.Arrays.MixedArrayKeyTypes) rather than to the library in isolation; the Scope:Changed rating reflects that compromise of the scanner crosses from the scanned code's trust boundary into the host. The upstream fix (PR #778, commit 9f596b50ea4498ea57b8cb341e920233b044debf) removed the eval-based resolution.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
AV:L and UI:R because malicious code must be present on the host and a scan actively run; PR:N as attacker only supplies scanned code; eval() gives full C:H/I:H/A:H with S:C on the host.
Primary rating from Vendor (https://github.com/PHPCSStandards/PHPCSUtils).
CVSS VectorVendor: https://github.com/PHPCSStandards/PHPCSUtils
DescriptionCVE.org
Impact
PHPCSUtils versions 1.0.0-alpha1 through 1.2.2 contain an arbitrary code execution vulnerability in PHPCSUtils\AbstractSniffs\AbstractArrayDeclarationSniff::getActualArrayKey(). The vulnerable method is reached by any sniff that extends AbstractArrayDeclarationSniff and calls getActualArrayKey().
Running PHPCS over untrusted PHP code through such a sniff, for example, in a CI pipeline that lints pull requests, or on a developer machine reviewing third-party code, could lead to arbitrary command execution on the scanning host.
The vulnerability happens when the method determines the value of an array key using eval(). A maliciously crafted array key such as 'system'('id') would be executed when the code was scanned.
Known attack vectors
Known code paths that reach the vulnerable method include the following PHPCSExtra sniffs:
Universal.Arrays.DuplicateArrayKeyUniversal.Arrays.MixedArrayKeyTypes
Other packages that call AbstractArrayDeclarationSniff::getActualArrayKey() may also be vulnerable.
Patches
This issue has been fixed in PHPCSUtils 1.2.3. We recommend all users upgrade to 1.2.3 or later.
Workaround
Users who cannot upgrade immediately can disable the sniffs that reach the vulnerable method by adding <exclude> tags to their custom ruleset (replace the placeholder standard and sniff names with the ones used in your setup):
<rule ref="Standard">
<exclude name="Standard.Category.SniffName"/>
</rule>For example, to disable the two PHPCSExtra sniffs listed under "Known attack vectors":
<rule ref="Universal">
<exclude name="Universal.Arrays.DuplicateArrayKey"/>
<exclude name="Universal.Arrays.MixedArrayKeyTypes"/>
</rule>To verify that the sniffs have been disabled, run PHPCS with the -e flag, which lists all the sniffs a standard will run. The excluded sniffs should no longer appear in the output:
phpcs -e --standard=/path/to/ruleset.xmlCredits
Many thanks to @rodrigoprimo for responsibly disclosing this vulnerability.
How can I report a security bug?
Please report security vulnerabilities privately via the "Security and quality" tab on the PHPCSUtils repository.
Technical POC Analysis
CWE-95, Eval Injection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A code-execution flaw in PHPCSUtils, the sniff helper library used by PHPCSExtra and PHP_CodeSniffer-based linting setups, allows crafted third-party PHP source to run commands on the machine performing the scan. Exposure is concentrated in engineering environments - CI pipelines that lint untrusted pull requests and developer workstations reviewing outside code - where scanning a single malicious file can compromise the host and everything it can reach. Leadership should care because build runners typically carry deployment credentials and broad network access, so a single compromised scan host can escalate into supply-chain and production risk.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
EUVD-2026-97779
GHSA-r6hr-vr92-vv28
NVD
CVE.org
EPSS
Exploit-DB