The LiteSpeed Cache plugin, used on more than four million WordPress sites, has patched an XSS vulnerability in version 5.7. The plugin provides all-in-one site acceleration capabilities, server-level caching, and a collection of optimization features. It is compatible with WordPress multisite, and popular plugins like WooCommerce, bbPress, and Yoast SEO, which may contribute to its popularity.
Wordfence security researcher István Márton discovered the XSS vulnerability and responsibly disclosed it to the LiteSpeed Cache Team on August 14, 2023. The Wordfence advisory describes how the vulnerability might make it possible for an attacker to inject malicious scripts:
The LiteSpeed Cache plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the ‘esi’ shortcode in versions up to, and including, 5.6 due to insufficient input sanitization and output escaping on user supplied attributes. This makes it possible for authenticated attackers with contributor-level and above permissions to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
Márton also cautioned that previous versions of WordPress contained a vulnerability that allowed shortcodes supplied by unauthenticated commenters to be rendered in certain configurations. All versions since WordPress 5.9 were subject to this vulnerability and if users aren’t on a patched version of WordPress, the vulnerability would “make it possible for unauthenticated attackers to exploit this Cross-Site Scripting vulnerability on vulnerable installations.”
LiteSpeed Cache patched the vulnerability in version 5.7, released to WordPress.org on October 10. Although the update has been available for two weeks, only 30% of the plugin’s user base is running the latest version.
LiteSpeed Cache users are recommended to update to the latest patched version as soon as possible. Check out the advisory from Wordfence for more details and a full technical analysis.