# Better Post & Filter Widgets for Elementor <= 1.9.2 - Authenticated (Contributor+) Stored Cross-Site Scripting via Custom Target Selector Widget Settings

- **ID:** WPSEC-2026-4219
- **Plugin:** Better Post & Filter Widgets for Elementor (`better-post-filter-widgets-for-elementor`), https://wordpress.org/plugins/better-post-filter-widgets-for-elementor/
- **Affected versions:** all versions before 1.9.3
- **Fixed in:** 1.9.3 (Update to 1.9.3 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 Medium, affected versions Medium (as of 2026-11-29)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/better-post-filter-widgets-for-elementor
- **Fix released:** 2026-11-28
- **Published:** 2026-11-29
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4219/

## Description

The Better Post & Filter Widgets for Elementor plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'target_selector' (Custom Target Selector) and 'target_widget' settings of its Filter, Search Bar and Sorting widgets in all versions up to, and including, 1.9.2. This is due to insufficient input sanitization of these values. They are output unchanged into the widgets' front-end data-settings, and the plugin's front-end script then passes them to jQuery as a selector, which turns a value containing HTML markup into DOM elements. This makes it possible for authenticated attackers, with contributor-level access and above who can edit with Elementor, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

## References

- https://wpsec.com/vuln/WPSEC-2026-4219/
- https://plugins.svn.wordpress.org/better-post-filter-widgets-for-elementor/tags/1.9.3/
- https://wordpress.org/plugins/better-post-filter-widgets-for-elementor/

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

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.
