Severity by source
AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Attacker supplies local file but the victim must run the scan (AV:L/UI:R); no attacker privileges needed (PR:N); eval breakout from the sniff to host yields S:C and full C/I/A on the scanning host.
Primary rating from Vendor (https://github.com/WordPress/WordPress-Coding-Standards).
CVSS VectorVendor: https://github.com/WordPress/WordPress-Coding-Standards
Lifecycle Timeline
3DescriptionCVE.org
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):
<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.xmlCredits
Many thanks to @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.
Articles & Coverage 2
AnalysisAI
Arbitrary command execution in WordPress Coding Standards (WordPressCS) before 3.4.1 lets attacker-controlled PHP source trigger code execution on the machine running the linter. The flawed WordPress.WP.EnqueuedResourceParameters sniff reconstructed the $ver argument of wp_enqueue_script()/wp_register_script() and passed it to eval(), so scanning a malicious file (for example a pull request in CI) with the WordPress or WordPress-Extra rulesets runs the attacker's payload. There is no public exploit identified at time of analysis and EPSS is low (0.18%), but the technical impact is total and a patched release (3.4.1) is available.
Technical ContextAI
WordPressCS is a set of PHP_CodeSniffer (PHPCS) sniffs distributed as the Composer package wp-coding-standards/wpcs, used to statically lint PHP against WordPress coding conventions. The root cause is CWE-95 (improper neutralization of directives in dynamically evaluated code, 'eval injection'): the is_falsy() method in EnqueuedResourceParametersSniff tried to decide whether a version argument evaluated to a falsy value by string-concatenating the argument's tokens into $code_string and calling eval("return (bool) $code_string;"). A token allow-list (T_STRING_CONCAT, parentheses, operators, casts, etc.) was intended to keep this 'safe,' but constructs like the dynamic function-call syntax 'system'('id') slipped through and were executed. The fix (PR #2771 / commit a29048d) removes eval() entirely and replaces it with static analysis using PHPCSUtils (Arrays, TextStrings, Collections), only recognizing literal false/0/'0'/''/empty-array as falsy.
RemediationAI
Vendor-released patch: 3.4.1 - upgrade wp-coding-standards/wpcs to 3.4.1 or later (e.g. composer require --dev wp-coding-standards/wpcs:^3.4.1), per the release at https://github.com/WordPress/WordPress-Coding-Standards/releases/tag/3.4.1 and advisory GHSA-3pwp-g2mj-5p3v. If you cannot upgrade immediately, disable the vulnerable sniff in your custom ruleset by adding <exclude name="WordPress.WP.EnqueuedResourceParameters"/> inside your <rule ref="WordPress"> (or WordPress-Extra) block, then confirm removal with phcs -e --standard=/path/to/ruleset.xml - the trade-off is losing enqueued-resource parameter checks (missing/incorrect $ver and in-footer arguments), a coding-quality regression but no security loss. As additional containment for CI, avoid linting untrusted pull requests on privileged runners, run the linter in an isolated/ephemeral container without deployment secrets, and treat third-party code review runs as untrusted execution.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-95 – Eval Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-49877
GHSA-3pwp-g2mj-5p3v