Skip to main content
Vulnerability Database/CVE-2026-104677

CVE-2026-104677: WP Coder WordPress Privilege Escalation

CVE-2026-104677 is a privilege escalation flaw in WP Coder WordPress plugin allowing Editor-level users to execute arbitrary PHP code and compromise the site. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104677 Overview

CVE-2026-104677 affects the WP Coder WordPress plugin in versions prior to 4.5.2. The plugin exposes a PHP code-execution feature without restricting it to administrators. Instead, access is gated on a content capability that the Editor role holds by default. Any authenticated user with Editor privileges can save and execute arbitrary PHP code on the server. This leads to full compromise of the WordPress site, including underlying file system and database access.

Critical Impact

Editor-level users can execute arbitrary PHP code on the server, resulting in full site takeover and potential lateral movement into the hosting environment.

Affected Products

  • WP Coder WordPress plugin versions before 4.5.2
  • WordPress sites with Editor-role users granted the gating content capability
  • Any site relying on the plugin's PHP snippet feature for content rendering

Discovery Timeline

  • 2026-10-07 - CVE-2026-104677 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-104677

Vulnerability Analysis

The WP Coder plugin provides a feature that allows site operators to embed and execute PHP code within content. The plugin should restrict this capability to administrators because arbitrary PHP execution is equivalent to full server control in a WordPress context. Instead, the plugin checks a general content-editing capability. The Editor role holds that capability by default in standard WordPress installations. As a result, any Editor can author a snippet containing arbitrary PHP and trigger its execution on the server.

The weakness is classified as [CWE-94] Improper Control of Generation of Code (Code Injection). Successful exploitation yields code execution under the web server user, enabling plugin and theme modification, credential theft from wp-config.php, database manipulation, and persistence through webshells.

Root Cause

The root cause is a missing authorization check. The code path that saves and renders PHP snippets validates a content capability rather than the administrator-only manage_options or unfiltered_html capability appropriate for code execution. This is a broken access control defect in the plugin's capability model.

Attack Vector

Exploitation requires an authenticated Editor account. The attacker logs into the WordPress admin interface, navigates to the WP Coder snippet editor, and saves a snippet containing PHP payload code. The plugin stores and later evaluates the snippet, executing the attacker's PHP in the server context. No social engineering of an administrator is required. Technical details are available in the WPScan Vulnerability Report.

Detection Methods for CVE-2026-104677

Indicators of Compromise

  • New or modified WP Coder snippet entries in the WordPress database (wp_posts or plugin-specific tables) authored by Editor accounts.
  • Unexpected PHP files written under wp-content/uploads/ or plugin directories following snippet save actions.
  • Outbound network connections initiated by the PHP-FPM or Apache worker process shortly after an Editor login.

Detection Strategies

  • Audit WordPress user roles and inventory accounts holding the Editor role, correlating with recent authentication events.
  • Inspect WP Coder plugin storage for snippets containing PHP tags, eval, system, exec, base64_decode, or file_put_contents.
  • Review web server access logs for POST requests to WP Coder admin endpoints originating from non-administrator sessions.

Monitoring Recommendations

  • Alert on file creation and modification events under WordPress document roots performed by the web server account.
  • Monitor WordPress audit logs for role changes, snippet creation, and plugin activation events.
  • Track process execution chains where the PHP interpreter spawns shell binaries such as sh, bash, curl, or wget.

How to Mitigate CVE-2026-104677

Immediate Actions Required

  • Upgrade the WP Coder plugin to version 4.5.2 or later on all affected WordPress sites.
  • Review existing Editor accounts and remove or demote any that do not require editorial privileges.
  • Audit stored WP Coder snippets and remove any PHP content that was not authored by a trusted administrator.

Patch Information

The vendor addressed CVE-2026-104677 in WP Coder version 4.5.2. The fix restricts the PHP code-execution feature to administrator-level users. Refer to the WPScan Vulnerability Report for advisory details and version history.

Workarounds

  • Deactivate the WP Coder plugin until the upgrade to 4.5.2 can be applied across the environment.
  • Remove the content capability from the Editor role using a role-management plugin or custom code, limiting snippet access to administrators.
  • Enforce multi-factor authentication for all Editor and Administrator accounts to reduce the risk of credential-based access.
bash
# Remove the capability that gates WP Coder PHP execution from the Editor role
wp role list
wp cap remove editor unfiltered_html
wp plugin update wp-coder --version=4.5.2

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.