{"id":"CVE-2026-45293","aliases":["EUVD-2026-49877","GHSA-3pwp-g2mj-5p3v"],"status":"published","title":"WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability","description":"WordPress Coding Standards is a set of PHP_CodeSniffer rules (sniffs) that enforce WordPress coding conventions. From 0.14.1 until 3.4.1, the WordPress.WP.EnqueuedResourceParameters sniff (active in the WordPress and WordPress-Extra rulesets) reconstructed the $ver argument passed to functions such as wp_enqueue_script() and ran it through eval() inside its is_falsy() method, so a maliciously crafted argument such as 'system'('id') would execute during a scan; as a result, running PHPCS with WordPressCS over untrusted PHP (for example a CI pipeline that lints pull requests, or a developer reviewing third-party code) could lead to arbitrary command execution on the scanning host. The WordPress-Core and WordPress-Docs rulesets are not affected. This issue is fixed in version 3.4.1.","severity":{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.00249,"percentile":0.16288,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-95"],"published":"2026-07-28T14:28:12Z","modified":"2026-10-28T02:31:10Z","fixes":[{"ecosystem":"Packagist","package":"wp-coding-standards/wpcs","fixed_in":["3.4.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"wp-coding-standards/wpcs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.14.1"},{"fixed":"3.4.1"}]}]},{"source":"osv","ecosystem":"Packagist","package":"wp-coding-standards/wpcs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.14.1"},{"fixed":"3.4.1"}]}],"versions":["0.14.1","1.0.0","1.1.0","1.2.0","1.2.1","2.0.0","2.0.0-RC1","2.1.0","2.1.1","2.2.0","2.2.1","2.3.0","3.0.0","3.0.1","3.1.0","3.2.0","3.3.0","3.4.0"]}],"products":[{"vendor":"wordpress","product":"wordpress-coding-standards"}],"references":[{"url":"https://github.com/WordPress/WordPress-Coding-Standards/security/advisories/GHSA-3pwp-g2mj-5p3v","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/WordPress/WordPress-Coding-Standards/pull/2771","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/WordPress/WordPress-Coding-Standards/commit/a29048d0bbef5cf25d42349c74e4072d3cbc8325","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/WordPress/WordPress-Coding-Standards/releases/tag/3.4.1","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-3pwp-g2mj-5p3v"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45293.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45293","tags":["advisory"]},{"url":"https://github.com/WordPress/WordPress-Coding-Standards","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-45293","title":"WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability","description":"WordPress Coding Standards is a set of PHP_CodeSniffer rules (sniffs) that enforce WordPress coding conventions. From 0.14.1 until 3.4.1, the WordPress.WP.EnqueuedResourceParameters sniff (active in the WordPress and WordPress-Extra rulesets) reconstructed the $ver argument passed to functions such as wp_enqueue_script() and ran it through eval() inside its is_falsy() method, so a maliciously crafted argument such as 'system'('id') would execute during a scan; as a result, running PHPCS with WordPressCS over untrusted PHP (for example a CI pipeline that lints pull requests, or a developer reviewing third-party code) could lead to arbitrary command execution on the scanning host. The WordPress-Core and WordPress-Docs rulesets are not affected. This issue is fixed in version 3.4.1.","status":"published","published":"2026-07-28T15:34:45.092Z","modified":"2026-07-29T13:47:28.857Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-95"],"updated_at":"2026-11-02T13:46:43.922571Z"}],"euvd":[{"id":"EUVD-2026-49877","description":"WordPress Coding Standards is a set of PHP_CodeSniffer rules (sniffs) that enforce WordPress coding conventions. From 0.14.1 until 3.4.1, the WordPress.WP.EnqueuedResourceParameters sniff (active in the WordPress and WordPress-Extra rulesets) reconstructed the $ver argument passed to functions such as wp_enqueue_script() and ran it through eval() inside its is_falsy() method, so a maliciously crafted argument such as 'system'('id') would execute during a scan; as a result, running PHPCS with WordPressCS over untrusted PHP (for example a CI pipeline that lints pull requests, or a developer reviewing third-party code) could lead to arbitrary command execution on the scanning host. The WordPress-Core and WordPress-Docs rulesets are not affected. This issue is fixed in version 3.4.1.","status":"published","published":"2026-07-28T15:34:45Z","modified":"2026-07-29T13:47:28Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T18:02:30.152277Z"}],"ghsa":[{"id":"GHSA-3pwp-g2mj-5p3v","title":"WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability","description":"### 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 `\u003cexclude\u003e` tag to their custom ruleset (the `\u003crule\u003e` `ref` value might vary depending on the ruleset):\n\n```xml\n\u003crule ref=\"WordPress\"\u003e\n\t\u003cexclude name=\"WordPress.WP.EnqueuedResourceParameters\"/\u003e\n\u003c/rule\u003e\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).","status":"published","published":"2026-07-28T14:28:12Z","modified":"2026-07-28T14:28:13Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-95"],"updated_at":"2026-11-02T14:40:53.707378Z"}],"nvd":[{"id":"CVE-2026-45293","description":"WordPress Coding Standards is a set of PHP_CodeSniffer rules (sniffs) that enforce WordPress coding conventions. From 0.14.1 until 3.4.1, the WordPress.WP.EnqueuedResourceParameters sniff (active in the WordPress and WordPress-Extra rulesets) reconstructed the $ver argument passed to functions such as wp_enqueue_script() and ran it through eval() inside its is_falsy() method, so a maliciously crafted argument such as 'system'('id') would execute during a scan; as a result, running PHPCS with WordPressCS over untrusted PHP (for example a CI pipeline that lints pull requests, or a developer reviewing third-party code) could lead to arbitrary command execution on the scanning host. The WordPress-Core and WordPress-Docs rulesets are not affected. This issue is fixed in version 3.4.1.","status":"published","published":"2026-07-28T16:18:13.503Z","modified":"2026-10-24T13:10:00.147Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-95"],"updated_at":"2026-11-02T14:12:33.249634Z"}],"osv":[{"id":"CVE-2026-45293","title":"WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability","description":"WordPress Coding Standards is a set of PHP_CodeSniffer rules (sniffs) that enforce WordPress coding conventions. From 0.14.1 until 3.4.1, the WordPress.WP.EnqueuedResourceParameters sniff (active in the WordPress and WordPress-Extra rulesets) reconstructed the $ver argument passed to functions such as wp_enqueue_script() and ran it through eval() inside its is_falsy() method, so a maliciously crafted argument such as 'system'('id') would execute during a scan; as a result, running PHPCS with WordPressCS over untrusted PHP (for example a CI pipeline that lints pull requests, or a developer reviewing third-party code) could lead to arbitrary command execution on the scanning host. The WordPress-Core and WordPress-Docs rulesets are not affected. This issue is fixed in version 3.4.1.","status":"published","published":"2026-07-28T15:34:45.092Z","modified":"2026-10-28T02:31:10.419194717Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-95"],"updated_at":"2026-11-02T15:45:05.172514Z"},{"id":"GHSA-3pwp-g2mj-5p3v","title":"WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability","description":"### 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 `\u003cexclude\u003e` tag to their custom ruleset (the `\u003crule\u003e` `ref` value might vary depending on the ruleset):\n\n```xml\n\u003crule ref=\"WordPress\"\u003e\n\t\u003cexclude name=\"WordPress.WP.EnqueuedResourceParameters\"/\u003e\n\u003c/rule\u003e\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).","status":"published","published":"2026-07-28T14:28:12Z","modified":"2026-07-28T14:56:51.873225Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-95"],"updated_at":"2026-11-02T15:46:36.092962Z"}]}}
