Flaws in The Events Calendar WordPress plugin enable unauthenticated RCE
Two critical vulnerabilities in a WordPress plugin called The Events Calendar could enable an unauthenticated attacker to achieve remote code execution (RCE) by submitting a crafted comment to an event page, Wordfence disclosed Monday.Both flaws, tracked as CVE-2026-78006 and CVE-2026-78159, have a CVSS score of 9.8 and were discovered by Wordfenceâs Argus AI vulnerability research agent.The Events Calendar is a plugin used on more than 600,000 WordPress websites, and each flaw represents a separate attack path stemming from how comments are handled by the pluginâs V2 single-event template. The flaws can only be exploited on public event pages where comments are enabled.Wordfence found that the event template causes the entire rendered webpage to be passed through WordPressâ Gutenberg block parser, including the comments section, which expands the potential attack surface to include anonymous comments left by unauthenticated users.
Related reading:
Even when comments are held for moderation, WordPress allows a user to see the preview of their pending comment, causing it to render and trigger the attack chain.In the attack chain enabled by CVE-2026-78006, the attacker crafts a comment formatted as a wp:legacy-widget block containing a malicious PHP object that allows for arbitrary OS command execution.When the malicious comment is parsed, it goes through The Event Calendarâs is_safe_widget_instance() method, which calls unserialize() and checks if the returned value contains a PHP object. If an object is not found, the plugin issues a valid hash for the attackerâs widget, allowing it to pass WordPressâ integrity checks.Wordfence found that the malicious object could pass through this method and receive a valid hash when the objectâs PHP magic method calls are followed by invalid data, causing unserialize() to return âfalse.â When the object later reaches WordPressâs legacy-widget renderer and its unserialize() call, these magic methods are triggered to execute arbitrary commands prior to the failure caused by the invalid data.âBy then, the dangerous behavior has already occurred,â Wordfence Threat Intelligence Lead Chloe Chamberland wrote.In the proof-of-concept exploit, the __unserialize() magic method is triggered, which calls custom_unserialize(); this method deserializes the attacker-controlled data and passes an attacker-controlled callback and argument array to array_map(). By setting the callback to system and the array to contain a shell command, the attacker can execute any command as the web server user.The second exploit chain, enabled by CVE-2026-78159, avoids the use of a PHP object and instead uses a comment containing a wp:legacy-widget block with a plain PHP array. This allows it to pass through the is_safe_widget_instance() and receive a valid hash without issue. Once it is deserialized by WordPressâs parser, it passes through the widget() method and is merged into the widgetâs arguments via array_merge().The event template engine later calls âextract( $this->context )â, which âturns every attacker-controlled array key, including classes, into a local variable in the template scope,â Chamberland wrote in the Wordfence blog post. The attackerâs next aim is to trigger The Event Calendarâs âmessages.phpâ sub-template to load, which causes the attacker-controlled $classes variable to be merged with the pluginâs default CSS class list and passed into its class-processing logic. To do this, they can force a âno resultsâ response from the widgetâs event query, for example, by adding â?tribe_paged=00â to the URL.Once the messages.php sub-template loads, the pluginâs CSS class helper processes the attacker-controlled $classes array, and because the helper executes any value that PHP recognizes as callable, the attacker can supply wp_update_user as an array value to trigger an admin password reset.The wp_update_user() function is called with a results array containing the attacker supplied values of âIDâ => true and âuser_passâ => true, which WordPress processes as instructions to change the password of user ID â1â to â1â. The attacker can then log in with this new password, gaining control over the site and the ability to execute code by uploading a malicious plugin.The developer of The Events Calendar plugin, StellarWP, patched CVE-2026-78006 on Aug. 25, 2026 and fixed CVE-2026-78159 on Sept. 10, 2026. Wordfence recommends all users of the plugin to upgrade to the fully patched version, 6.17.4.1 as soon as possible.
Network Security, Vulnerability Management
Flaws in The Events Calendar WordPress plugin enable unauthenticated RCE
(Credit: Bilal Ulker â stock.adobe.com)
An In-Depth Guide to Network Security
Get essential knowledge and practical strategies to fortify your network security.
Related Events
Get daily email updates
SC Media's daily must-read of the most current and pressing daily news
You can skip this ad in 5 seconds
How it works
Once you click Generate, Ollama reads this article and crafts 5 comprehension questions. Your answers are graded against the article content â general knowledge won't be enough. Score 70+ to count toward your certificate.
Questions are cached â you'll always get the same 5 for this article.