# Related Posts for WordPress <= 2.3.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via Post Title

- **ID:** WPSEC-2026-0808
- **Plugin:** Related Posts for WordPress (`related-posts-for-wp`), https://wordpress.org/plugins/related-posts-for-wp/
- **Affected versions:** all versions before 3.0.0
- **Fixed in:** 3.0.0 (Update to 3.0.0 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 Low, affected versions None seen (as of 2026-10-12)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/related-posts-for-wp
- **Fix released:** 2026-10-11
- **Published:** 2026-10-12
- **URL:** https://wpsec.com/vuln/WPSEC-2026-0808/

## Description

The Related Posts for WordPress plugin for WordPress is vulnerable to Stored Cross-Site Scripting via post titles in all versions up to, and including, 2.3.1 due to insufficient output escaping of related posts' titles in the 'Related Posts' meta box of the post editor, where the title is printed unescaped inside a single-quoted HTML attribute. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts through a crafted post title that execute whenever an editor or administrator opens a post to which the attacker's post is linked as a related post, for example a post the attacker submitted for review.

## References

- https://wpsec.com/vuln/WPSEC-2026-0808/
- https://plugins.svn.wordpress.org/related-posts-for-wp/tags/3.0.0/
- https://wordpress.org/plugins/related-posts-for-wp/

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

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.
