# Relevanssi <= 4.28.9 - Authenticated (Contributor+) Stored Cross-Site Scripting via Post Tags

- **ID:** WPSEC-2026-3831
- **Plugin:** Relevanssi – A Better Search (`relevanssi`), https://wordpress.org/plugins/relevanssi/
- **Affected versions:** all versions before 4.28.10
- **Fixed in:** 4.28.10 (Update to 4.28.10 or later.)
- **Severity:** Medium 4.9 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-24)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/relevanssi
- **Fix released:** 2026-11-24
- **Published:** 2026-11-25
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3831/

## Description

The Relevanssi plugin for WordPress is vulnerable to Stored Cross-Site Scripting via post tag names in all versions up to, and including, 4.28.9. This is due to insufficient output sanitization in the relevanssi_the_tags() and relevanssi_get_the_tags() template functions. Each tag name goes through Relevanssi's highlighting, which decodes HTML entities, so HTML-encoded markup stored in a tag name becomes live HTML. When the list is returned rather than echoed, it is returned without sanitization. This makes it possible for authenticated attackers with contributor-level access and above, who can create tags when they save a post, to inject arbitrary web scripts. The scripts run when a user visits a page whose theme outputs the returned tag list.

## References

- https://wpsec.com/vuln/WPSEC-2026-3831/
- https://plugins.svn.wordpress.org/relevanssi/tags/4.28.10/
- https://wordpress.org/plugins/relevanssi/

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

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.
