# PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

High severity, published 2026-09-29. Update phpcsstandards/phpcsutils to 1.2.3 or later: composer update phpcsstandards/phpcsutils.

Canonical URL: https://buzzphp.com/security/ghsa-r6hr-vr92-vv28 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 8.6) |
| Published | 2026-09-29 |
| Updated | 2026-09-29 |
| CVE | [CVE-2026-65954](https://nvd.nist.gov/vuln/detail/CVE-2026-65954) |
| GHSA | [GHSA-r6hr-vr92-vv28](https://github.com/advisories/GHSA-r6hr-vr92-vv28) |
| Weakness | CWE-95 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| phpcsstandards/phpcsutils | >= 1.0.0-alpha1, < 1.2.3 | 1.2.3 |

## What to do

Update phpcsstandards/phpcsutils to 1.2.3 or later: composer update phpcsstandards/phpcsutils.

Check which version you run with `composer show phpcsstandards/phpcsutils`, and every affected package with `composer audit`.

## About this advisory

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().

## Links

- [GHSA-r6hr-vr92-vv28 on GitHub](https://github.com/advisories/GHSA-r6hr-vr92-vv28)
- [CVE-2026-65954 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-65954)
- [All Composer security advisories](https://buzzphp.com/security)
