packagist package report

Is phpcsstandards/phpcsutils safe?

1 known vulnerability, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so packagist packages are not covered.


      cvss
      0.0
      high

      severity band, no base score published

      epss
      not scored

      chance of exploitation in 30 days

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-r6hr-vr92-vv28, the advisory selected below

      // 1 advisories

      GHSA-r6hr-vr92-vv28

      HIGHCVE-2026-65954
      // 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):

      	

      For example, to disable the two PHPCSExtra sniffs listed under "Known attack vectors":

      	
      	

      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.xml
      // credits

      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.


      Checked 2026-09-30 at 00:41 UTC. The most recent advisory here was published 2026-09-29. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.