Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
AI generation endpoint is network-exposed with no authentication (AV:N/PR:N); stored XSS executes in victim browser across scope boundary (S:C/UI:R); impact limited to session data theft and DOM manipulation (C:L/I:L/A:N).
Primary rating from Vendor (WPScan).
CVSS VectorVendor: WPScan
Lifecycle Timeline
5DescriptionCVE.org
The BetterDocs WordPress plugin before 4.5.5 does not sanitise an AI-generated documentation summary before storing and outputting it, and the feature that generates it is exposed to unauthenticated users, allowing them to store a malicious payload via prompt injection that executes in the browser of any visitor who views the affected page, including administrators.
AnalysisAI
Stored cross-site scripting via prompt injection in the BetterDocs WordPress plugin (versions 4.0.0 through 4.5.5) allows unauthenticated attackers to permanently implant malicious JavaScript into documentation pages by manipulating the plugin's AI-generated summary feature. Because the AI output is stored unsanitized and the generation endpoint requires no authentication, an attacker can craft adversarial prompts that cause the AI to produce and persist executable script payloads - payloads that then fire in the browser of every subsequent visitor, including WordPress administrators. A publicly available exploit exists via WPScan; no active exploitation confirmed in CISA KEV at time of analysis.
Technical ContextAI
The vulnerability is rooted in CWE-79 (Improper Neutralization of Input During Web Page Generation - Cross-site Scripting), specifically the stored variant. BetterDocs is a WordPress documentation management plugin that includes an AI-powered feature to auto-generate documentation summaries from user-supplied inputs. The flaw lies in a classic trust boundary failure: AI-generated output is treated as safe content and persisted directly to the WordPress database, then echoed into the HTML page without output encoding or sanitization. This creates a prompt injection → stored XSS chain - an attacker manipulates the AI's generation process to include JavaScript, which the application faithfully stores and renders. Affected CPE: cpe:2.3:a:unknown:betterdocs:*:*:*:*:*:*:*:* (NVD CPE mapping is incomplete; actual vendor is WPDeveloper). The scope change (S:C in CVSS) reflects that the malicious script executes in the victim's browser security context, not the server's.
RemediationAI
Update BetterDocs to version 4.5.5 or later, which introduces output sanitization for AI-generated content prior to storage and rendering. This is the only fully effective fix. If immediate patching is not feasible, disable the AI documentation summary generation feature within the plugin settings - this eliminates the attack surface entirely but removes AI-assisted authoring functionality. As an additional layer, a web application firewall rule can be configured to block requests to the AI generation endpoint from unauthenticated users, though this may break legitimate anonymous usage flows and should be tested before deployment. Avoid relying on Content Security Policy alone as a compensating control, as CSP enforcement varies across WordPress themes and plugins and may not fully block the injected payload. Refer to the WPScan advisory at https://wpscan.com/vulnerability/db41e3db-74c2-4b94-bbff-bd1493295241/ for additional remediation context.
More in Betterdocs
View allDeserialization of Untrusted Data vulnerability in WPDeveloper BetterDocs.3.3. Rated critical severity (CVSS 9.0), this
Unauthenticated remote code execution in BetterDocs Pro for WordPress (versions through 3.8.0) is achievable by abusing
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in WPDeveloper BetterDocs a
Unauthenticated SQL injection in BetterDocs Pro for WordPress allows remote attackers to extract sensitive database cont
Stored Cross-Site Scripting (XSS) in the BetterDocs WordPress plugin version 4.6.2 and earlier allows authenticated user
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in WPDeveloper
Sensitive system information in the BetterDocs WordPress knowledge base plugin (WPDeveloper, all versions through 4.3.10
Missing Authorization vulnerability in WPDeveloper BetterDocs betterdocs allows Exploiting Incorrectly Configured Access
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-44870
GHSA-x6ph-p955-jvgx