Junglewise Threat Intelligence

CVE-2026-12157: wpdevteam BetterDocs Stored XSS in CategorySlateLayout blockId

CVE-2026-12157 · Severity: medium · CVSS 6.4 · Published 2026-06-19

Technologies: WPDeveloper BetterDocs. Vendors: WPDeveloper.

Executive brief

The BetterDocs plugin for WordPress, which is used to create documentation and FAQ pages, contains a security flaw that allows users with contributor-level access or higher to inject malicious scripts into pages. These scripts will automatically run in the browser of any visitor who views the affected page. This could lead to unauthorized actions being performed on behalf of site administrators or the theft of sensitive session information.

Technical details

The BetterDocs plugin for WordPress is vulnerable to Stored Cross-Site Scripting (XSS) due to insufficient input sanitization and output escaping in the CategorySlateLayout::render() method. Specifically, the 'blockId' attribute of the 'betterdocs/category-slate-layout' Gutenberg block is echoed directly into an HTML class attribute without using the esc_attr() function. This allows authenticated attackers with contributor-level permissions or higher to inject arbitrary web scripts. These scripts are stored on the server and execute in the context of any user's browser who visits the compromised page. The vulnerability is present in all versions up to and including 4.5.3.

Affected products

  • wpdevteam BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot up to, and including, 4.5.3

Timeline

  • 2026-06-19: disclosed
  • 2026-06-19: advisory

References

Related threats