# Shariff Wrapper <= 4.6.22 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes

- **ID:** WPSEC-2026-4713
- **Plugin:** Shariff Wrapper (`shariff`), https://wordpress.org/plugins/shariff/
- **Affected versions:** all versions before 4.6.23
- **Fixed in:** 4.6.23 (Update to 4.6.23 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 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-4713/

## Description

The Shariff Wrapper plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the [shariff] shortcode and meta box attributes in all versions up to, and including, 4.6.22. This is due to the plugin adding the data-services attribute by running str_replace() on every occurrence of 'data-url=' in the finished button HTML, combined with insufficient sanitization of attributes such as 'cssclass' and 'style'. These attributes override the sanitized plugin settings and are only HTML-escaped, so attacker-supplied text containing 'data-url=' is rewritten and breaks out of its HTML attribute. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

## References

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

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

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.
