Contextual Related Posts <= 4.5.6 - Authenticated (Contributor+) Stored Cross-Site Scripting via Post Title in Shortcode and Block Heading Template
- ID
- WPSEC-2026-3694
- Plugin
- Contextual Related Posts (contextual-related-posts)
- Affected
- from 1.9 before 4.5.7
- Remediation
- Update to 4.5.7 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Weakness
- CWE-79
- Usage
- Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-11-22
- Attack surface
- Contextual Related Posts on WPSec AttackSurface
- Fix released
- Published
Description
The Contextual Related Posts plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the %postname% placeholder in versions 1.9 up to, and including, 4.5.6 due to the post title being inserted unescaped for the %postname% placeholder after the heading template supplied through the [crp] shortcode or Related Posts block 'title' attribute has been sanitized. Because WordPress leaves double quotes in post titles, an attacker can place %postname% inside an HTML attribute of the template and use a crafted title to break out of it and add event handlers. 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-3694/
- https://plugins.svn.wordpress.org/contextual-related-posts/tags/4.5.7/
- https://wordpress.org/plugins/contextual-related-posts/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS