Update dependency wp-coding-standards/wpcs to v3.4.1 [SECURITY] - #50
Open
renovate[bot] wants to merge 1 commit into
Open
Update dependency wp-coding-standards/wpcs to v3.4.1 [SECURITY]#50renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.3.0→3.4.1WordPress Coding Standards (WordPressCS) contains an arbitrary code execution vulnerability
CVE-2026-45293 / GHSA-3pwp-g2mj-5p3v
More information
Details
Impact
WordPress Coding Standards (WordPressCS) versions before 3.4.1 contain an arbitrary code execution vulnerability in the
WordPress.WP.EnqueuedResourceParameterssniff. 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
WordPressandWordPress-Extrarulesets. TheWordPress-Coreruleset and theWordPress-Docsruleset are not affected.The vulnerability happens when the sniff checks whether the
$varargument passed to functions such aswp_enqueue_script()orwp_register_script()evaluates to a falsy value. The sniff'sis_falsy()method reconstructed the argument and ran it througheval(). Because of this, a maliciously crafted$verargument 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
WordPressandWordPress-Extrarulesets, who cannot upgrade immediately, can disable the affected sniff by adding an<exclude>tag to their custom ruleset (the<rule>refvalue might vary depending on the ruleset):To verify that the sniff has been disabled, run PHPCS with the
-eflag, which lists all the sniffs a standard will run.WordPress.WP.EnqueuedResourceParametersshould no longer appear in the output under theWordPresssection:Credits
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.
Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
WordPress/WordPress-Coding-Standards (wp-coding-standards/wpcs)
v3.4.1Compare Source
This is a security release and all users are advised to update their WordPressCS install as soon as possible.
Changed
PHPCSUtilsversion to 1.2.3 (was 1.2.2). #2770PHPCSExtraversion to 1.5.1 (was 1.5.0). #2770Fixed
WordPress.WP.EnqueuedResourceParameterssniff 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. #2771This affects users of the
WordPressandWordPress-Extrarulesets. TheWordPress-Coreruleset and theWordPress-Docsruleset are not affected.For more details, see the security advisory.
Thanks to [@FORIMOC] for responsibly disclosing the vulnerability.
v3.4.0Compare Source
We're happy to welcome [@rodrigoprimo] as co-maintainer of WordPressCS as of this release.
Added
WordPress.Arrays.ArrayDeclarationSpacing: newallow_single_item_single_line_explicit_key_arraysproperty to replace the, now deprecated,allow_single_item_single_line_associative_arraysproperty. #2696WordPress.Arrays.ArrayDeclarationSpacing(props [@RafaelFunchal], [@mattgaldino] and [@rodrigoprimo], #2489, #2593, #2682),WordPress.CodeAnalysis.AssignmentInTernaryCondition(props [@Nic-Sevic] and [@rodrigoprimo], #2488, #2678),WordPress.DB.RestrictedClasses(props [@paulgibbs] and [@rodrigoprimo], #2455, #2689),WordPress.DB.DirectDatabaseQuery(props [@jaymcp] and [@rodrigoprimo], #2458, #2697),WordPress.DB.RestrictedFunctions(props [@paulgibbs] and [@rodrigoprimo], #2453, #2676),WordPress.DB.SlowDBQuery(props [@petitphp] and [@rodrigoprimo], #2464, #2699),WordPress.PHP.DevelopmentFunctions(props [@gogdzl] and [@rodrigoprimo], #2490, #2690),WordPress.PHP.NoSilencedErrors(props [@gogdzl] and [@rodrigoprimo], #2495, #2694),WordPress.PHP.PregQuoteDelimiter(props [@tikifez] and [@rodrigoprimo], #2487, #2677),WordPress.PHP.RestrictedPHPFunctions(props [@gogdzl] and [@rodrigoprimo], #2491, #2693),WordPress.Security.PluginMenuSlug(props [@jasonkenison], #2592),WordPress.WP.AlternativeFunctions(props [@pamprn09], [@bhubbard] and [@rodrigoprimo], #2496, #2588, #2687),WordPress.WP.DiscouragedConstants(props [@RafaelFunchal], [@paulopmt1] and [@rodrigoprimo], #2493, #2589, #2680),WordPress.WP.GlobalVariablesOverride(props [@paulopmt1] and [@rodrigoprimo], #2586, #2679).This documentation can be exposed via the
PHP_CodeSniffer--generator=...command-line argument.Changed
PHP_CodeSnifferversion to 3.13.5 (was 3.13.4). #2761PHPCSUtilsversion to 1.2.2 (was 1.1.0). #2761minimum_wp_version, as used by a number of sniffs detecting usage of deprecated WP features, has been updated to6.7. #2757WordPress.NamingConventions.PrefixAllGlobalshas been updated to recognize pluggable functions introduced in WP up to WP 7.0.0. #2747WordPress.WP.ClassNameCasehas been updated to recognize classes introduced in WP up to WP 7.0.0. #2747WordPress.WP.DeprecatedFunctionsnow detects functions deprecated in WordPress up to WP 7.0.0. #2747ConstantsHelper::is_use_of_global_constant()method will no longer flag a constant alias created via an importusestatement as it were the use of a global constant. #2579ConstantsHelper::is_in_function_call()method will now act fully case-agnostic for the function names being checked. #2706Previously, the
$valid_functionsparameter would need to be passed with the function names as keys in lowercase.WordPress.PHP.NoSilencedErrors: error silencing is no longer accepted for theparse_url()function. #2701WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound. #2688WordPress.PHP.RestrictedPHPFunctions. #2702Deprecated
WordPress.Arrays.ArrayDeclarationSpacing: theallow_single_item_single_line_associative_arraysproperty has been deprecated in favor of the newallow_single_item_single_line_explicit_key_arraysproperty. #2696This is a name change only. The functionality of these properties is the same.
Fixed
WordPress.DB.PreparedSQLandWordPress.DB.PreparedSQLPlaceholders: false positive for static method calls to a non-global class namedwpdb. #2753WordPress.Security.EscapeOutput: false positive forget_search_query()when the$escapedparameter was passed as fully qualified or non-lowercasetrue. #2618WordPress.Security.EscapeOutput: false negative for_deprecated_file()calls when thebasename( __FILE__ )pattern used non-standard casing for eitherbasename()and/or__FILE__. #2729WordPress.WP.AlternativeFunctions: false negative when class functions/constants/properties use the same name as select global WP constants/functions. #2617WordPress.WP.AlternativeFunctions: false positive for fully qualified references to the global PHP stream constants \STDIN, \STDOUT, and \STDERR. #2617WordPress.WP.CronInterval: false positive when the callback function reference used a different case than the function declaration, even though they are in the same file. #2730Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.