WPIDE Plugin Vulnerable to Unauthenticated Remote Code Execution via CSRF Nonce Bypass
A critical CSRF nonce bypass vulnerability in the WPIDE WordPress plugin allows unauthenticated attackers to achieve remote code execution by tricking administrators into activating malicious PHP snippets.

The popular WordPress plugin WPIDE, a file manager and code editor, has been found to contain a critical vulnerability that allows unauthenticated attackers to execute arbitrary PHP code on a victim's server. Versions 3.6.0 through 3.6.4 are affected by this flaw, tracked as CVE-2026-124251. The vulnerability stems from an incomplete fix for a previous Cross-Site Request Forgery (CSRF) vulnerability, CVE-2026-57766, which was addressed in version 3.5.6.
Researchers discovered that the nonce validation implemented in version 3.6.0 was too narrowly scoped. The security service responsible for validating nonces only checks if the page parameter exactly matches 'wpide'. However, WPIDE registers several submenu pages that include a '#/' fragment in their URLs, such as 'wpide#/snippets'. Because these slugs do not precisely match 'wpide', the nonce validation is bypassed entirely for requests targeting these submenus. WordPress core's handling of URL-encoded fragments allows these requests to reach the plugin's internal router without proper CSRF protection.
The exploit chain leverages the plugin's 'Snippets' feature, introduced in version 3.6.0. An unauthenticated attacker can craft a malicious request to the '/snippets/save' endpoint. This request, delivered via CSRF to a logged-in administrator, allows the attacker to save an 'active' PHP snippet. During the saving process, the plugin executes the provided PHP code server-side, enabling immediate arbitrary code execution. The attacker can also use the '/snippets/execute' endpoint to re-run any previously saved snippets, providing persistent access.
This vulnerability is particularly dangerous because it requires no prior authentication and can be triggered by tricking any logged-in administrator. The attacker only needs to host a malicious page that automatically submits a crafted form to the vulnerable WordPress site. The exploit works by sending the malicious payload in the request body, formatted as JSON, even when the Content-Type is set to 'text/plain', a method that bypasses certain security checks.
WPIDE versions 3.6.0 to 3.6.2 were confirmed to be vulnerable, with the official CVE record listing versions up to 3.6.4 as affected. The vulnerability was patched in version 3.6.5, released on November 8, 2026, alongside version 3.6.4 which included a partial fix. The patch in 3.6.5 not only enforces request verification across all admin pages but also rejects 'text/plain' and form-encoded bodies for state-changing requests, effectively closing the cross-site delivery vector.
Users who cannot immediately update their WPIDE plugin are advised to deactivate it. If exploitation is suspected, administrators should audit their WordPress installation for suspicious files in the 'wp-content/' directory and 'uploads/wpide-snippets/php/', remove any unknown snippets, and consider rotating administrator credentials as a precautionary measure. The timeline of discovery and patching highlights a rapid cycle from vulnerability identification to disclosure and remediation.
This incident underscores the persistent risks associated with CSRF vulnerabilities, especially when fixes are incomplete. It also emphasizes the importance of thorough security testing for plugins that handle code execution or sensitive administrative functions. The narrow scope of the initial fix allowed attackers to continue exploiting the plugin, demonstrating how subtle implementation errors can lead to severe security outcomes.