Widget Options <= 4.2.6.1 — Authenticated (Contributor+) Code Injection via 'post_content' Parameter
CVE-2026-116615Published · Updated Action summary
Affected: ≤4.2.6.1Update to 4.2.7 or newer
All remediation steps- Severity
- High8.8
- CVSS
- 8.8CVSS 3.1 · CNA (Wordfence)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HWhat does this vector mean?
AV:NAttack vector- Network
AC:LAttack complexity- Low
PR:LPrivileges required- Low
UI:NUser interaction- None
S:UScope- Unchanged
C:HConfidentiality- High
I:HIntegrity- High
A:HAvailability- High
- Required access
- Unknown
- Exploit prediction (EPSS)
- No score
- CISA KEV
- Not listed
On this page8
Am I affected?
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets widget-options
- Affected≤ 4.2.6.1
- Patched in4.2.7
Update to 4.2.7 or newer.
You are affected if you run ≤ 4.2.6.1. Version 4.2.7 and later are not affected by this issue.
- Check your version: in wp-admin go to Plugins → Installed Plugins and read the version under Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets.
- No admin access? Run a passive check of your site. It reads public files only.
What to do
- Update to version 4.2.7, or a newer patched version
- Rotate administrator passwords and application secrets if the site ran a vulnerable version while publicly reachable.
- Watch Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets to get an email when the next vulnerability is published.
Advisory
Source description from Wordfence Intelligence, credited to Wordfence PRISM.
The Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets plugin for WordPress is vulnerable to Code Injection in all versions up to, and including, 4.2.6.1 via the `post_content` parameter. This is due to asymmetric parsing between the save-time strip filter (`widgetopts_strip_logic_from_blocks()`) and the render-time parser (`blockopts_filter_before_display()`): embedding an inner `<!--start_widgetopts` literal inside a JSON key causes the write-side `json_decode` to see a non-`class` key and skip stripping — persisting the payload verbatim to the database — while the render-side `str_replace` reconstitutes the key to `class`, feeding the attacker-controlled `logic` value directly into `@eval`. This makes it possible for authenticated attackers, with Author-level access and above, to inject PHP expressions that execute on every front-end page view, enabling boolean-oracle exfiltration of WordPress site configuration data — including admin email address, default role, and arbitrary `get_option`, `get_user_meta`, and `get_post_meta` values — via the plugin's allowlisted-function sandbox, which escalates to unrestricted code execution if any installed plugin extends the `widgetopts_allowed_php_functions` filter. Contributors can also exploit this vulnerability when their submitted post is later published by an administrator; notably, the injected payload executes for all site visitors, including unauthenticated users, because a trust-flag mechanism introduced in version 4.2.6 causes `widgetopts_safe_eval_trusted()` to bypass its non-admin short-circuit at every legacy render callsite. Exploitation by attackers with contributor-level access and above requires that an administrator (or editor) later publishes the contributor's submission. On a default installation, where that is not configured, the vulnerability requires attackers with author-level access and above.
Exploits & references
Proof-of-concept & detection
No public proof-of-concept or detection template is known for this vulnerability.
Advisories & patches
- Advisorywordfence.com
Related CVEs
More in Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets
All 11| Severity | Vulnerability | CVE | Published |
|---|---|---|---|
| High8.8 | Authenticated (Author+) Remote Code Execution ≤4.2.5Update to 4.2.6 | CVE-2026-116852 | |
| High8.8 | Authenticated (Contributor+) Remote Code Execution ≤4.2.3Update to 4.2.4 | CVE-2026-54823 | |
| High8.8 | Authenticated (Contributor+) Remote Code Execution via Display Logic ≤4.2.2Update to 4.2.3 | CVE-2026-2052 | |
| High8.8 | Authenticated (Contributor+) Remote Code Execution ≤4.1.3Update to 4.2.0 | CVE-2026-27984 | |
| Medium6.4 | Authenticated (Contributor+) Stored Cross-Site Scripting ≤4.1.2Update to 4.1.3 | CVE-2025-10580 |
- High8.8Authenticated (Author+) Remote Code Execution
≤4.2.5Update to 4.2.6
- High8.8Authenticated (Contributor+) Remote Code Execution
≤4.2.3Update to 4.2.4
- High8.8Authenticated (Contributor+) Remote Code Execution via Display Logic
≤4.2.2Update to 4.2.3
- High8.8Authenticated (Contributor+) Remote Code Execution
≤4.1.3Update to 4.2.0
- Medium6.4Authenticated (Contributor+) Stored Cross-Site Scripting
≤4.1.2Update to 4.1.3
Timeline
CVE published
Severity high, CVSS 8.8
Record last updated
Sources & licenses
Wordfence record- Vulnerability data
- Wordfence Intelligence. [object Object] Licensed under the CC BY-SA 4.0.
- CVE® identifiers
- [object Object]. Used under the CVE Program. CVE® is a registered trademark of The MITRE Corporation.
- CVSS / CWE
- National Vulnerability Database (NVD), shown unmodified. This product uses the NVD API but is not endorsed or certified by the NVD.
- VulnCrest content
- Summary, remediation guidance and page layout © VulnCrest. Not sourced from NVD.
