Executive brief
GenerateBlocks, a popular layout and design plugin for WordPress, contains a security flaw that allows users with basic editing permissions (Contributor level and above) to inject malicious scripts into website pages. By exploiting how the plugin handles dynamic data tags, an attacker can cause these scripts to run in the browsers of other visitors or administrators. This could lead to unauthorized actions being performed on behalf of other users or the theft of sensitive session information.
Technical details
The GenerateBlocks plugin for WordPress is vulnerable to Stored Cross-Site Scripting (XSS) due to insufficient input sanitization and output escaping in its dynamic tag system. Authenticated attackers with Contributor-level permissions or higher can inject arbitrary web scripts by placing a dynamic tag, such as {{post_meta key:...}}, into non-URL HTML attributes like 'title', 'aria-label', or 'alt' within a GenerateBlocks element. By then setting the corresponding unprotected post meta key via the Custom Fields metabox to a value containing a closing quote and an event-handler attribute (e.g., 'onmouseover'), the attacker can execute JavaScript when a user interacts with or views the affected page. This vulnerability affects all versions up to and including 2.3.0.
Affected products
- edge22 GenerateBlocks up to, and including, 2.3.0
Timeline
- 2026-08-01: disclosed
- 2026-08-01: advisory
References
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.2.1/includes/dynamic-tags/class-dynamic-tag-callbacks.php
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.2.1/includes/dynamic-tags/class-register-dynamic-tag.php
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.2.1/includes/functions.php
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.2.1/includes/general.php
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.3.0/includes/dynamic-tags/class-dynamic-tag-callbacks.php
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.3.0/includes/dynamic-tags/class-register-dynamic-tag.php
- https://plugins.trac.wordpress.org/browser/generateblocks/tags/2.3.0/includes/functions.php