# Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets <= 4.6.4 - Unauthenticated Arbitrary Shortcode Execution via Recent Comments Widget

- **ID:** WPSEC-2026-4240
- **Plugin:** Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets (`ultimate-post-kit`), https://wordpress.org/plugins/ultimate-post-kit/
- **Affected versions:** from 2.0.0 before 4.6.5
- **Fixed in:** 4.6.5 (Update to 4.6.5 or later.)
- **Severity:** Medium 6.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N)
- **Weakness:** CWE-94
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-11-30)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/ultimate-post-kit
- **Fix released:** 2026-11-29
- **Published:** 2026-11-30
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4240/

## Description

The Ultimate Post Kit plugin for WordPress is vulnerable to arbitrary shortcode execution via the Recent Comments widget in all versions up to, and including, 4.6.4, due to the widget printing visitor-supplied comment text and comment author names into Elementor page output without neutralizing square brackets. Elementor inserts that output into the_content before WordPress runs do_shortcode() on it. This makes it possible for unauthenticated attackers to execute arbitrary registered shortcodes by posting a comment that the widget displays once it is approved.

## References

- https://wpsec.com/vuln/WPSEC-2026-4240/
- https://plugins.svn.wordpress.org/ultimate-post-kit/tags/4.6.5/
- https://wordpress.org/plugins/ultimate-post-kit/

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

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.
