A newly discovered high-severity vulnerability in the WordPress LiteSpeed Cache plugin has placed millions of websites at risk of cross-site scripting (XSS) attacks. Identified as CVE-2024-47374, with a CVSS score of 7.2, the vulnerability impacts all versions of the plugin up to 6.5.0.2. The flaw enables attackers to inject arbitrary JavaScript code, which can be executed on a website when visitors access compromised pages. This stored XSS attack allows the script to persist on the server, making it a potent tool for attackers seeking to escalate privileges or even fully compromise websites.
The vulnerability arises from improper sanitization of the X-LSCACHE-VARY-VALUE HTTP header. In this case, the plugin fails to adequately escape output, allowing malicious actors to insert harmful web scripts. For the exploit to be successful, certain settings in the LiteSpeed Cache plugin’s Page Optimization options—specifically “CSS Combine” and “Generate UCSS”—need to be enabled. Once these conditions are met, attackers can inject scripts that become embedded in a website’s database, executing whenever an affected page is accessed by a visitor, potentially leading to a wide array of harmful consequences.
Stored cross-site scripting (XSS) attacks like this are particularly dangerous due to their persistent nature. Once a script is injected, it remains on the website, executing whenever the compromised resource is loaded. This could result in attackers stealing sensitive user data, including login credentials or personal information, or even hijacking user sessions to perform actions on their behalf. In the worst-case scenario, if the hijacked session belongs to an administrator, attackers could gain complete control over the WordPress site, allowing them to alter content, install malicious plugins, or launch further attacks on site visitors.
Given that the LiteSpeed Cache plugin is used on over six million websites, the attack surface is vast, making this vulnerability an attractive target for cybercriminals. Website owners are strongly urged to update to version 6.5.1, which was released on September 25, 2024, after the flaw was responsibly disclosed by researcher TaiYou from the Patchstack Alliance. This update effectively patches the issue, preventing the XSS exploit from being triggered.
This vulnerability follows on the heels of another recently addressed flaw in the LiteSpeed Cache plugin—CVE-2024-44000, with a CVSS score of 7.5—which could have allowed unauthorized users to take control of accounts on affected sites. These incidents highlight the persistent threats posed by vulnerabilities in widely used plugins and emphasize the importance of timely security updates.
Moreover, WordPress sites have been increasingly targeted through plugins, which often serve as an easy entry point for attackers looking to compromise legitimate websites. Recently, other critical vulnerabilities have been disclosed in popular WordPress plugins. The TI WooCommerce Wishlist plugin, for example, was found to have a SQL injection vulnerability (CVE-2024-43917) with a CVSS score of 9.8, allowing attackers to execute arbitrary SQL queries. Additionally, the Jupiter X Core plugin was found to have a severe flaw (CVE-2024-7772) enabling attackers to upload arbitrary files to the server, potentially leading to remote code execution.