Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets <= 4.2.6.1 - Authenticated (Contributor+) Remote Code Execution via Display Logic in Freeform Block Marker

High 8.8 CWE-94Fixed in 4.2.7
ID
WPSEC-2026-2846
Plugin
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets (widget-options)
Affected
from 4.0.0 before 4.2.7
Remediation
Update to 4.2.7 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Usage
Plugin High · Affected versions Medium among sites WPSec scans, 2026-11-12
Attack surface
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets on WPSec AttackSurface
Fix released
Published

Description

The Widget Options plugin for WordPress is vulnerable to Remote Code Execution via the legacy freeform display-logic marker (<!--start_widgetopts ... end_widgetopts-->) in post content in all versions up to, and including, 4.2.6.1. This is due to the save-time filter that strips display logic from non-administrator content and the render-time parser decoding the marker differently: the parser removes every marker delimiter from the payload before JSON-decoding it, so a payload that the strip filter re-encodes with an empty logic value can still carry display logic that is evaluated with eval() at render time. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute arbitrary PHP code on the server when the Display Logic module is enabled.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON or Markdown · All advisories: JSON, RSS

License: CC BY 4.0