CVE-2023-6487 — LuckyWP Table of Contents <= 2.1.4 - Authenticated Cross-Site Scripting
The LuckyWP Table of Contents plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the ‘Header Title’ field in all versions up to and including 2.1.4 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with administrator-level access, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This only affects multi-site installations and installations where unfiltered_html has been disabled.
Proof of Concepts
The plugin provides features for custom Header Titles. The form was not sanitized, causing an XSS vulnerability
- Open Table of Contents Settings
/wp-admin/options-general.php?page=lwptoc_settings&tab=general
- Add the XSS payload to the Header Title
Contents<img src onerror=alert(/XSS/)>
The XSS payload will be triggered when a page with a Table of Contents is opened
Impact
This makes it possible for authenticated attackers, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.