Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-45293 — wpcs

🟠 CVSS 8.6 — High ✅ No Known Exploit CWE-95 NVD
8.6
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability

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).

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-45293 is classified as 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").

Affected software

CVE-2026-45293 is recorded against 2 packages.

  • unknown
  • wp-coding-standards/wpcs (from 0.14.1 up to 3.4.1)

Timeline and source

Published on 28 July 2026 and last revised on 29 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com
github.com
github.com
github.com

Other advisories for this package

unknown has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')) in other software:

Details

Severity HIGH
CVSS Score 8.6
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CWE CWE-95
Public Exploit ✅ No
Source NVD
Published 2026-07-28
Updated 2026-08-20
Modified 2026-07-29
Fix URL N/A

Affected Packages

Software From version Fixed in
unknown — —
wp-coding-standards/wpcs 0.14.1 3.4.1

Similar Threats

Site Security Check

Is wpcs part of your stack?

CVE-2026-45293 is rated CVSS 8.6 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓