Vulnerabilities / BetterDocs / WPSEC-2026-2870

BetterDocs <= 4.9.5 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'toc_title' Shortcode Attribute

Medium 6.4 CWE-79Fixed in 4.9.6
ID
WPSEC-2026-2870
Plugin
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot (betterdocs)
Affected
all versions before 4.9.6
Remediation
Update to 4.9.6 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Weakness
CWE-79
Usage
Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-11-12
Attack surface
BetterDocs on WPSec AttackSurface
Fix released
Published

Description

The BetterDocs plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'toc_title' attribute of the betterdocs_toc shortcode in all versions up to, and including, 4.9.5 due to insufficient output escaping on user-supplied attributes. Only the fallback title taken from the plugin settings was escaped. A title supplied through the shortcode attribute was echoed without escaping. 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.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON or Markdown · All advisories: JSON, RSS

License: CC BY 4.0