CVE-2026-12157: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wpdevteam BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot
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.
AI Analysis
Technical Summary
CVE-2026-12157 is a stored cross-site scripting vulnerability in the BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot WordPress plugin by wpdevteam. The vulnerability stems from insufficient input sanitization and output escaping in the CategorySlateLayout::render() method, which directly outputs the blockId attribute into an HTML class attribute without using esc_attr(). This flaw allows authenticated attackers with contributor-level or higher privileges to inject arbitrary JavaScript code that executes in the context of users viewing the injected pages. The affected versions are all versions up to and including 4.5.3.
Potential Impact
An attacker with contributor-level or higher access can inject malicious scripts that execute in the browsers of users who visit the compromised pages. This can lead to theft of user credentials, session hijacking, or other malicious actions performed in the context of the affected site. The vulnerability does not affect availability but impacts confidentiality and integrity of user data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict contributor-level access to trusted users only and consider removing or disabling the vulnerable Gutenberg block if possible. Monitor vendor channels for updates and apply patches promptly once released.
CVE-2026-12157: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wpdevteam BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot
Description
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.
CVSS v3.1
Score 6.4medium
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-12157 is a stored cross-site scripting vulnerability in the BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot WordPress plugin by wpdevteam. The vulnerability stems from insufficient input sanitization and output escaping in the CategorySlateLayout::render() method, which directly outputs the blockId attribute into an HTML class attribute without using esc_attr(). This flaw allows authenticated attackers with contributor-level or higher privileges to inject arbitrary JavaScript code that executes in the context of users viewing the injected pages. The affected versions are all versions up to and including 4.5.3.
Potential Impact
An attacker with contributor-level or higher access can inject malicious scripts that execute in the browsers of users who visit the compromised pages. This can lead to theft of user credentials, session hijacking, or other malicious actions performed in the context of the affected site. The vulnerability does not affect availability but impacts confidentiality and integrity of user data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict contributor-level access to trusted users only and consider removing or disabling the vulnerable Gutenberg block if possible. Monitor vendor channels for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2026-06-12T18:27:41.912Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a34df96f198dc38c19de550
Added to database: 06/19/2026, 06:20:06 UTC
Last enriched: 06/26/2026, 13:13:18 UTC
Last updated: 08/03/2026, 07:17:55 UTC
Views: 37
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.