# Custom Related Posts <= 1.8.2 - Authenticated (Contributor+) Stored Cross-Site Scripting via Related Post Titles and Permalinks

- **ID:** WPSEC-2026-4416
- **Plugin:** Custom Related Posts (`custom-related-posts`), https://wordpress.org/plugins/custom-related-posts/
- **Affected versions:** all versions before 1.8.3
- **Fixed in:** 1.8.3 (Update to 1.8.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-12-03)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/custom-related-posts
- **Fix released:** 2026-12-01
- **Published:** 2026-12-03
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4416/

## Description

The Custom Related Posts plugin for WordPress is vulnerable to Stored Cross-Site Scripting via related post titles and permalinks in all versions up to, and including, 1.8.2. This is due to insufficient output escaping of the cached relation data in the front-end related posts list, the post edit meta box, the post search AJAX results and the meta box JavaScript. The relation cache is kept in the unprotected post meta keys crp_relations_from and crp_relations_to, which users can write as custom fields on posts they can edit. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts that execute whenever a user, including an administrator, views a page with the related posts or the affected post editing screen.

## References

- https://wpsec.com/vuln/WPSEC-2026-4416/
- https://plugins.svn.wordpress.org/custom-related-posts/tags/1.8.3/
- https://wordpress.org/plugins/custom-related-posts/

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

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.
