WPCode <= 2.3.5 - Authenticated (Author+) Remote Code Execution via CPT Capability Bypass via XML-RPC wp.newPost

8.8
Improper Control of Generation of Code ('Code Injection')
CVE CVE-2026-8832
CVSS 8.8 (High)
Publicly Published May 26, 2026
Last Updated May 27, 2026
Researcher Win3

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.

References

Share

Vulnerability Details for WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager

Software Type Plugin
Software Slug insert-headers-and-footers (view on wordpress.org)
Patched? Yes
Remediation Update to version 2.3.6, or a newer patched version
Affected Version
  • <= 2.3.5
Patched Version
  • 2.3.6

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