Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. wp-coding-standards/wpcs
  4. ›
  5. CVE-2026-45293

CVE-2026-45293: WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability

July 28, 2026

WordPress Coding Standards (WordPressCS) versions before 3.4.1 contain an arbitrary code execution vulnerability in the WordPress.WP.EnqueuedResourceParameters sniff. As a result, running PHPCS with WordPressCS over untrusted PHP code, 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.

This affects users of the WordPress and WordPress-Extra rulesets. The WordPress-Core ruleset and the WordPress-Docs ruleset are not affected.

The vulnerability happens when the sniff checks whether the $var argument passed to functions such as wp_enqueue_script() or wp_register_script() evaluates to a falsy value. The sniff’s is_falsy() method reconstructed the argument and ran it through eval(). Because of this, a maliciously crafted $ver argument such as 'system'('id') would be executed during the scan.

References

  • github.com/WordPress/WordPress-Coding-Standards/commit/a29048d0bbef5cf25d42349c74e4072d3cbc8325
  • github.com/WordPress/WordPress-Coding-Standards/pull/2771
  • github.com/WordPress/WordPress-Coding-Standards/releases/tag/3.4.1
  • github.com/WordPress/WordPress-Coding-Standards/security/advisories/GHSA-3pwp-g2mj-5p3v
  • github.com/advisories/GHSA-3pwp-g2mj-5p3v
  • nvd.nist.gov/vuln/detail/CVE-2026-45293

Code Behaviors & Features

Detect and mitigate CVE-2026-45293 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.14.1 before 3.4.1

Fixed versions

  • 3.4.1

Solution

Upgrade to version 3.4.1 or above.

Impact 8.6 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

Source file

packagist/wp-coding-standards/wpcs/CVE-2026-45293.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 29 Jul 2026 12:19:22 +0000.