# The Events Calendar <= 6.18.3 - Authenticated (Contributor+) Stored Cross-Site Scripting via Copied Events Widget Block Instance

- **ID:** WPSEC-2026-2671
- **Plugin:** The Events Calendar (`the-events-calendar`), https://wordpress.org/plugins/the-events-calendar/
- **Affected versions:** from 6.11.2 before 6.18.3.1
- **Fixed in:** 6.18.3.1 (Update to 6.18.3.1 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin High, affected versions High (as of 2026-11-06)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/the-events-calendar
- **Fix released:** 2026-11-05
- **Published:** 2026-11-06
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2671/

## Description

The The Events Calendar plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the instance of a copied Events widget (legacy widget block) in versions 6.11.2 up to, and including, 6.18.3. This is due to the plugin re-signing with wp_hash() any widget instance embedded in block content when it renders, without first passing it through the widget's own update() sanitization. As a result, unvalidated settings are passed to the widget view as template variables, and template attribute names, including event-handler attributes, are printed without being blocked. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

## References

- https://wpsec.com/vuln/WPSEC-2026-2671/
- https://plugins.svn.wordpress.org/the-events-calendar/tags/6.18.3.1/
- https://wordpress.org/plugins/the-events-calendar/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-2671/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
