{
 "schema_version": "1.9.2",
 "id": "WPSEC-2026-4588",
 "modified": "2026-12-04T09:47:12Z",
 "published": "2026-12-04T09:47:12Z",
 "summary": "Custom Related Posts <= 1.8.3 - Authenticated (Administrator+) Stored Cross-Site Scripting via Custom Layout Template",
 "details": "The Custom Related Posts plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the custom layout template in versions 1.8.0 up to, and including, 1.8.3. The template is filtered with wp_kses_post() when it is saved, but it is then split into lines and each line is output separately, so a tag or attribute value spanning several lines passes the filter as harmless text and becomes markup after the split. This makes it possible for authenticated attackers, with administrator-level access and above, to inject arbitrary web scripts in pages that display related posts. This only affects multi-site installations and installations where unfiltered_html has been disabled.",
 "severity": [
  {
   "type": "CVSS_V3",
   "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N"
  }
 ],
 "affected": [
  {
   "package": {
    "ecosystem": "WordPress:Plugin",
    "name": "custom-related-posts"
   },
   "ranges": [
    {
     "type": "ECOSYSTEM",
     "events": [
      {
       "introduced": "1.8.0"
      },
      {
       "fixed": "1.8.4"
      }
     ]
    }
   ],
   "database_specific": {
    "affected_text": [
     "from 1.8.0 before 1.8.4"
    ]
   }
  }
 ],
 "references": [
  {
   "type": "ADVISORY",
   "url": "https://wpsec.com/vuln/WPSEC-2026-4588/"
  },
  {
   "type": "WEB",
   "url": "https://plugins.svn.wordpress.org/custom-related-posts/tags/1.8.4/"
  },
  {
   "type": "PACKAGE",
   "url": "https://wordpress.org/plugins/custom-related-posts/"
  }
 ],
 "database_specific": {
  "url": "https://wpsec.com/vuln/WPSEC-2026-4588/",
  "cwe_ids": [
   "CWE-79"
  ],
  "vulnerability_type": "XSS",
  "severity": "Medium",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  }
 }
}
