Skip to content
Heist/ feed
HighFix available

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

Type: advisorySource: OSV1 source record

### 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.DuplicateArrayKey` - `Universal.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 `` tags to their custom ruleset (replace the placeholder standard and sniff names with the ones used in your setup): ```xml ``` For example, to disable the two PHPCSExtra sniffs listed under "Known attack vectors": ```xml ``` To v

Announced Source revision 1
Original source ↗

GHSA-r6hr-vr92-vv28

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-r6hr-vr92-vv28

phpcsstandards/phpcsutils

Source reference: /affected/0/package/name

Affected versions
1.0.0

Source reference: /affected/0/versions

1.0.0-alpha1

Source reference: /affected/0/versions

1.0.0-alpha2

Source reference: /affected/0/versions

1.0.0-alpha3

Source reference: /affected/0/versions

1.0.0-alpha4

Source reference: /affected/0/versions

1.0.0-rc1

Source reference: /affected/0/versions

1.0.1

Source reference: /affected/0/versions

1.0.10

Source reference: /affected/0/versions

1.0.11

Source reference: /affected/0/versions

1.0.12

Source reference: /affected/0/versions

1.0.2

Source reference: /affected/0/versions

1.0.3

Source reference: /affected/0/versions

1.0.4

Source reference: /affected/0/versions

1.0.5

Source reference: /affected/0/versions

1.0.6

Source reference: /affected/0/versions

1.0.7

Source reference: /affected/0/versions

1.0.8

Source reference: /affected/0/versions

1.0.9

Source reference: /affected/0/versions

1.1.0

Source reference: /affected/0/versions

1.1.1

Source reference: /affected/0/versions

1.1.2

Source reference: /affected/0/versions

1.1.3

Source reference: /affected/0/versions

1.2.0

Source reference: /affected/0/versions

1.2.1

Source reference: /affected/0/versions

1.2.2

Source reference: /affected/0/versions

Fixed versions
1.2.3

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "1.0.0-alpha1"
          },
          {
            "fixed": "1.2.3"
          }
        ]
      }
    ],
    "package": {
      "name": "phpcsstandards/phpcsutils",
      "purl": "pkg:composer/phpcsstandards/phpcsutils",
      "ecosystem": "Packagist"
    },
    "versions": [
      "1.0.0",
      "1.0.0-alpha1",
      "1.0.0-alpha2",
      "1.0.0-alpha3",
      "1.0.0-alpha4",
      "1.0.0-rc1",
      "1.0.1",
      "1.0.10",
      "1.0.11",
      "1.0.12",
      "1.0.2",
      "1.0.3",
      "1.0.4",
      "1.0.5",
      "1.0.6",
      "1.0.7",
      "1.0.8",
      "1.0.9",
      "1.1.0",
      "1.1.1",
      "1.1.2",
      "1.1.3",
      "1.2.0",
      "1.2.1",
      "1.2.2"
    ],
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-r6hr-vr92-vv28/GHSA-r6hr-vr92-vv28.json"
    }
  }
]
Related CVEs
CVE-2026-65954

Source reference: /aliases

Publisher severity

high

Source reference: /database_specific/severity

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

Event
#29752 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement