Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
PR:L confirmed by contributor-level requirement; S:C because injected script executes in victim browser context; A:N as no availability impact applies.
Primary rating from Vendor (Wordfence).
CVSS VectorVendor: Wordfence
Lifecycle Timeline
2DescriptionCVE.org
The BetterDocs - Knowledge Base Docs & FAQ Solution for Elementor & Block Editor plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the blockId attribute of the betterdocs/category-slate-layout Gutenberg block in versions up to, and including, 4.5.3. This is due to insufficient input sanitization and output escaping in the CategorySlateLayout::render() method, which echoes the blockId block attribute directly into an HTML class attribute without esc_attr(). 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.
AnalysisAI
Stored Cross-Site Scripting in BetterDocs WordPress plugin (versions ≤4.5.3) allows authenticated contributors to inject persistent malicious scripts via the unescaped blockId attribute of the betterdocs/category-slate-layout Gutenberg block. The injected payload executes in the browser of any visitor who loads the compromised page, enabling session hijacking, credential theft, or admin-level privilege escalation against site operators. No public exploit identified at time of analysis, but the contributor-level authentication threshold makes this accessible on any WordPress site permitting open or shared content authorship.
Technical ContextAI
BetterDocs (CPE: cpe:2.3:a:wpdevteam:betterdocs_-__ai_documentation,_knowledge_base,_docs,_wikis,_faq_with_chatbot) is a WordPress plugin providing knowledge base, FAQ, wiki, and documentation functionality integrated with both the Gutenberg block editor and Elementor. The vulnerable code resides in the CategorySlateLayout::render() method at includes/Editors/BlockEditor/Blocks/CategorySlateLayout.php (lines 66 and 97, confirmed via WordPress SVN at tags/4.5.3 and tags/4.3.12). The blockId block attribute - which identifies individual block instances - is echoed directly into an HTML class attribute without invoking WordPress's built-in esc_attr() sanitization function. This is a textbook CWE-79 (Improper Neutralization of Input During Web Page Generation) violation: user-controlled data flows from block editor input into rendered HTML output without encoding, and because the payload persists in the WordPress database as block content, every subsequent page load delivers the attack to new victims.
RemediationAI
An upstream fix is available via WordPress plugin SVN changeset 3576713 (https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3576713%40betterdocs&new=3576713%40betterdocs), which addresses the missing esc_attr() call in CategorySlateLayout::render(). Administrators should update BetterDocs to the version released after 4.5.3 via the WordPress plugin dashboard as the primary remediation; note that the exact patched release version number was not specified in the available data and should be verified against the official WordPress plugin page before updating. As a compensating control prior to patching, administrators should audit and revoke contributor-level access for any untrusted or unnecessary accounts - reducing or eliminating the population of users who can author Gutenberg blocks. If the betterdocs/category-slate-layout block is not actively used, disabling the BetterDocs plugin entirely or restricting block editor capabilities to editor-level and above via a capability management plugin (e.g., Members) provides meaningful risk reduction with the trade-off of limiting documentation functionality.
More in Wordpress Plugin
View allThe Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in
Remote code execution in the WP Query Console WordPress plugin (versions up to and including 1.0) by Ajit Bohra allows u
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-37982
GHSA-hcf9-p628-6437