CVE-2026-45293: Wp coding standards/wpcs WordPress Coding Standards (WordPressCS) Contains Vulnerability

HIGH
Advisory Identifier: GHSA-3pwp-g2mj-5p3v
CVSS 8.6
CWE-95
Published
Advisory Summary

CVE-2026-45293 is a HIGH (CVSS 8.6) wordpress coding standards (wordpresscs) contains vulnerability (CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')) affecting Wp coding standards/wpcs libraries in the Packagist ecosystem. The issue involves wordpress coding standards (wordpresscs) contains an arbitrary code execution vulnerability. Remediation is available by upgrading affected packages to version 3.4.1.

CVE-2026-45293 at a Glance

CVE Identifier CVE-2026-45293
GHSA Identifier GHSA-3pwp-g2mj-5p3v
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
Affected Product Wp coding standards/wpcs
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-45293

To remediate this vulnerability, upgrade all affected Wp coding standards/wpcs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wp-coding-standards/wpcs fixed: 3.4.1
Upgrade wp-coding-standards/wpcs to 3.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wp-coding-standards/wpcs

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-45293, inspect your project dependencies for Wp coding standards/wpcs:

inspect dependencies for wp-coding-standards/wpcs

Analyze the terminal output to locate any version of Wp coding standards/wpcs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval"). In Wp coding standards/wpcs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact 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. ### Patches This issue has been fixed in WordPressCS 3.4.1. We recommend all users upgrade to 3.4.1 or later. ### Workaround Users of the `WordPress` and `WordPress-Extra` rulesets, who cannot upgrade immediately, can disable the affected sniff by adding an `<exclude>` tag to their custom ruleset (the `<rule>` `ref` value might vary depending on the ruleset): ```xml <rule ref="WordPress"> <exclude name="WordPress.WP.EnqueuedResourceParameters"/> </rule> ``` To verify that the sniff has been disabled, run PHPCS with the `-e` flag, which lists all the sniffs a standard will run. `WordPress.WP.EnqueuedResourceParameters` should no longer appear in the output under the `WordPress` section: ``` phpcs -e --standard=/path/to/ruleset.xml ``` ### Credits Many thanks to [@FORIMOC](https://github.com/FORIMOC) 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 WPCS repository](https://github.com/WordPress/WordPress-Coding-Standards/security).

CVE-2026-45293 Affected Wp coding standards/wpcs Versions

1 component(s)
Fixed Versions:
3.4.1
Product / Package Ecosystem Affected Versions Fixed Version
wp-coding-standards/wpcs
Packagist
≥ 0.14.1
< 3.4.1
3.4.1

References

Frequently Asked Questions

What is CVE-2026-45293?
CVE-2026-45293 is a security vulnerability in Wp coding standards/wpcs involving WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability under CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection').
Which Wp coding standards/wpcs versions are affected?
Affected versions include releases prior to 3.4.1 across affected packages: wp-coding-standards/wpcs.
What version fixes CVE-2026-45293?
Upgrading to 3.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wp-coding-standards/wpcs affected?
Yes, wp-coding-standards/wpcs is affected in releases prior to 3.4.1. Upgrade your dependency to 3.4.1 or later.
What is the CVSS score of CVE-2026-45293?
CVE-2026-45293 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-45293?
CVE-2026-45293 is classified under CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").).
How can I check Packagist dependencies for CVE-2026-45293?
Run the dependency tree command: 'inspect dependencies for wp-coding-standards/wpcs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3pwp-g2mj-5p3v",
  "modified" : "2026-07-28T14:28:12Z",
  "published" : "2026-07-28T14:28:12Z",
  "aliases" : [ "CVE-2026-45293" ],
  "summary" : "WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability",
  "details" : "### Impact\n\nWordPress 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.\n\nThis affects users of the `WordPress` and `WordPress-Extra` rulesets. The `WordPress-Core` ruleset and the `WordPress-Docs` ruleset are not affected.\n\nThe 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.\n\n### Patches\n\nThis issue has been fixed in WordPressCS 3.4.1. We recommend all users upgrade to 3.4.1 or later.\n\n### Workaround\n\nUsers of the `WordPress` and `WordPress-Extra` rulesets, who cannot upgrade immediately, can disable the affected sniff by adding an `<exclude>` tag to their custom ruleset (the `<rule>` `ref` value might vary depending on the ruleset):\n\n```xml\n<rule ref=\"WordPress\">\n\t<exclude name=\"WordPress.WP.EnqueuedResourceParameters\"/>\n</rule>\n```\n\nTo verify that the sniff has been disabled, run PHPCS with the `-e` flag, which lists all the sniffs a standard will run. `WordPress.WP.EnqueuedResourceParameters` should no longer appear in the output under the `WordPress` section:\n\n```\nphpcs -e --standard=/path/to/ruleset.xml\n```\n\n### Credits\n\nMany thanks to [@FORIMOC](https://github.com/FORIMOC) for responsibly disclosing this vulnerability.\n\n### How can I report a security bug?\n\nPlease report security vulnerabilities privately via [the \"Security and quality\" tab on the WPCS repository](https://github.com/WordPress/WordPress-Coding-Standards/security).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wp-coding-standards/wpcs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.14.1"
      }, {
        "fixed" : "3.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WordPress/WordPress-Coding-Standards/security/advisories/GHSA-3pwp-g2mj-5p3v"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WordPress/WordPress-Coding-Standards/pull/2771"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WordPress/WordPress-Coding-Standards/commit/a29048d0bbef5cf25d42349c74e4072d3cbc8325"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WordPress/WordPress-Coding-Standards"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WordPress/WordPress-Coding-Standards/releases/tag/3.4.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-95" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-28T14:28:12Z",
    "nvd_published_at" : null
  }
}