Skip to content
OpenAdvisories
High · 8.6 CVE-2026-65954 EUVD-2026-97779GHSA-r6hr-vr92-vv28

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

Published Oct 12, 2026 · Updated Oct 13, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
PHPCSStandards PHPCSUtils >= 1.0.0-alpha1, <= 1.2.2 —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist phpcsstandards/phpcsutils >= 1.0.0-alpha1, < 1.2.3 1.2.3 GHSA-r6hr-vr92-vv28

References