# Shariff Wrapper <= 4.6.22 - Unauthenticated Cross-Site Scripting via Shariff Widget Document Title

- **ID:** WPSEC-2026-4714
- **Plugin:** Shariff Wrapper (`shariff`), https://wordpress.org/plugins/shariff/
- **Affected versions:** from 4.5.1 before 4.6.23
- **Fixed in:** 4.6.23 (Update to 4.6.23 or later.)
- **Severity:** Medium 6.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Medium, affected versions Low (as of 2026-12-05)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/shariff
- **Fix released:** 2026-12-04
- **Published:** 2026-12-05
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4714/

## Description

The Shariff Wrapper plugin for WordPress is vulnerable to Cross-Site Scripting via the Shariff widget in all versions up to, and including, 4.6.22. This is due to the widget building a [shariff] shortcode string from the document title and running do_shortcode() on it after decoding HTML entities with html_entity_decode(), which turns encoded double quotes back into literal quotes. An entity-encoded quote in a search query, an author display name or a post title can therefore close the title attribute and add further shortcode attributes to the rendered buttons. This makes it possible for unauthenticated attackers to inject arbitrary web scripts through a crafted search query that runs when a user follows a link to the search results page (reflected). It also makes it possible for authenticated attackers, with subscriber-level access and above, to store a payload in their display name that runs whenever someone visits their author archive (stored), as long as the Shariff widget is shown on those pages.

## References

- https://wpsec.com/vuln/WPSEC-2026-4714/
- https://plugins.svn.wordpress.org/shariff/tags/4.6.23/
- https://wordpress.org/plugins/shariff/

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

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.
