# GenerateBlocks <= 2.5.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Dynamic Tag Editor Preview

- **ID:** WPSEC-2026-2914
- **Plugin:** GenerateBlocks (`generateblocks`), https://wordpress.org/plugins/generateblocks/
- **Affected versions:** from 2.0.0 before 2.5.1
- **Fixed in:** 2.5.1 (Update to 2.5.1 or later.)
- **Severity:** Medium 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-12)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/generateblocks
- **Fix released:** 2026-11-10
- **Published:** 2026-11-12
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2914/

## Description

The GenerateBlocks plugin for WordPress is vulnerable to Stored Cross-Site Scripting via dynamic tag previews in the block editor in all versions up to, and including, 2.5.0. This is due to insufficient sanitization of preview replacements. Server-side sanitization was skipped whenever the viewing user had the unfiltered_html capability, and the text block preview inserted raw replacement values into HTML, including attributes such as event handlers. This makes it possible for authenticated attackers, with contributor-level access and above, to plant dynamic tags (for example a 'replace' modifier carrying an event handler payload) that execute arbitrary web scripts when an administrator opens or previews the post in the editor.

## References

- https://wpsec.com/vuln/WPSEC-2026-2914/
- https://plugins.svn.wordpress.org/generateblocks/tags/2.5.1/
- https://wordpress.org/plugins/generateblocks/

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

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.
