CVE-2026-8832: CWE-94 Improper Control of Generation of Code ('Code Injection') in smub WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager
The WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including, 2.3.5 This is due to the 'wpcode' custom post type being registered without a custom capability_type or capability restrictions in the wpcode_register_post_type() function, allowing WordPress core to fall back to standard post capabilities for all creation paths including XML-RPC. This makes it possible for authenticated attackers, with author-level access and above, to create and publish executable PHP snippet posts via XML-RPC wp.newPost, which are then executed server-side via eval() in the run_eval() function when the snippet is rendered through the [wpcode] shortcode.
AI Analysis
Technical Summary
The WPCode plugin for WordPress registers its 'wpcode' custom post type without custom capability restrictions, causing WordPress to default to standard post capabilities. This allows authenticated users with author-level access or higher to create and publish PHP snippet posts via the XML-RPC wp.newPost method. These snippets are executed server-side through an eval() call in the run_eval() function when the [wpcode] shortcode renders the snippet. This improper control of code generation (CWE-94) leads to remote code execution, impacting all sites using affected versions up to 2.3.5.
Potential Impact
An attacker with author-level WordPress access can execute arbitrary PHP code on the server remotely, potentially leading to full site compromise, data theft, or service disruption. The vulnerability affects confidentiality, integrity, and availability of the affected WordPress site. No known exploits in the wild have been reported at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, restrict author-level access to trusted users only and consider disabling XML-RPC if not required. Monitor for updates from the plugin vendor and apply any official patches promptly once available.
CVE-2026-8832: CWE-94 Improper Control of Generation of Code ('Code Injection') in smub WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager
Description
The WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including, 2.3.5 This is due to the 'wpcode' custom post type being registered without a custom capability_type or capability restrictions in the wpcode_register_post_type() function, allowing WordPress core to fall back to standard post capabilities for all creation paths including XML-RPC. This makes it possible for authenticated attackers, with author-level access and above, to create and publish executable PHP snippet posts via XML-RPC wp.newPost, which are then executed server-side via eval() in the run_eval() function when the snippet is rendered through the [wpcode] shortcode.
CVSS v3.1
Score 8.8high
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The WPCode plugin for WordPress registers its 'wpcode' custom post type without custom capability restrictions, causing WordPress to default to standard post capabilities. This allows authenticated users with author-level access or higher to create and publish PHP snippet posts via the XML-RPC wp.newPost method. These snippets are executed server-side through an eval() call in the run_eval() function when the [wpcode] shortcode renders the snippet. This improper control of code generation (CWE-94) leads to remote code execution, impacting all sites using affected versions up to 2.3.5.
Potential Impact
An attacker with author-level WordPress access can execute arbitrary PHP code on the server remotely, potentially leading to full site compromise, data theft, or service disruption. The vulnerability affects confidentiality, integrity, and availability of the affected WordPress site. No known exploits in the wild have been reported at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, restrict author-level access to trusted users only and consider disabling XML-RPC if not required. Monitor for updates from the plugin vendor and apply any official patches promptly once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2026-05-18T13:53:59.461Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a16a562e29bf47b50a64317
Added to database: 05/27/2026, 08:03:46 UTC
Last enriched: 05/27/2026, 08:18:23 UTC
Last updated: 07/31/2026, 19:23:00 UTC
Views: 82
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.