Executive brief
The Events Calendar is a popular WordPress plugin for managing event pages and content. A flaw in its widget validation allows unauthenticated attackers to inject malicious code through event comments, which is then executed on the server. An attacker can exploit this without needing to log in or have their comment approved, directly compromising the website and potentially allowing full server takeover.
Technical details
The vulnerability is a PHP object injection and remote code execution flaw in the is_safe_widget_instance() function. The root cause is insufficient validation before unserialize() is called, combined with enable_rendering_widget_copied() forging a valid wp_hash integrity check. An attacker can bypass the safety checks by leveraging PHP magic methods invoked during parsing, then inject malicious serialized objects through event comment HTML. The V2 single-event template runs do_blocks() over buffered comments and returns a moderation-hash URL, allowing unauthenticated commenters to immediately view their pending comment. This delivers the injected block markup to the vulnerable code path before moderation occurs. Exploitation requires comments to be enabled on events. Patches are available in versions after 6.17.4.
Affected products
- Modern Tribe The Events Calendar up to and including 6.17.4
Timeline
- 2026-09-12: disclosed