Widget Options <= 4.2.2 - Authenticated (Contributor+) Remote Code Execution via Display Logic

8.8
Improper Control of Generation of Code ('Code Injection')
CVE CVE-2026-2052
CVSS 8.8 (High)
Publicly Published May 1, 2026
Last Updated May 2, 2026
Researchers bashu - VN
stealthcopter

Description

The Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 4.2.2 via the Display Logic feature. This is due to the plugin using eval() on user-supplied Display Logic expressions with an insufficient blocklist/allowlist that can be bypassed using array_map with string concatenation, combined with a lack of authorization enforcement on the extended_widget_opts_block attribute. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute code on the server. The vulnerability was partially patched in version 4.2.0.

References

Share

2 affected software packages

Software Type Plugin
Software Slug extended-widget-options
Patched? Yes
Remediation Update to version 5.3.3, or a newer patched version
Affected Version
  • <= 5.3.2
Patched Version
  • 5.3.3
Software Type Plugin
Software Slug widget-options (view on wordpress.org)
Patched? Yes
Remediation Update to version 4.2.3, or a newer patched version
Affected Version
  • <= 4.2.2
Patched Version
  • 4.2.3

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation