Skip to main content

CVE-2024-12874: CWE-79 Cross-Site Scripting (XSS) in Unknown Top Comments

Medium
VulnerabilityCVE-2024-12874cvecve-2024-12874cwe-79
Published: Thu May 15 2025 (05/15/2025, 20:06:58 UTC)
Source: CVE
Vendor/Project: Unknown
Product: Top Comments

Description

The Top Comments WordPress plugin through 1.0 does not sanitise and escape some of its settings, which could allow high privilege users such as admin to perform Stored Cross-Site Scripting attacks even when the unfiltered_html capability is disallowed (for example in multisite setup).

AI-Powered Analysis

AILast updated: 07/04/2025, 07:40:37 UTC

Technical Analysis

CVE-2024-12874 is a medium-severity Stored Cross-Site Scripting (XSS) vulnerability identified in the Top Comments WordPress plugin version 1.0 and earlier. The vulnerability arises because the plugin fails to properly sanitize and escape certain settings, allowing high-privilege users, such as administrators, to inject malicious scripts. Notably, this exploitation can occur even when the unfiltered_html capability is disabled, such as in multisite WordPress setups, which typically restrict the ability to post unfiltered HTML. The vulnerability is classified under CWE-79, indicating improper neutralization of input during web page generation. The CVSS 3.1 base score is 4.8, reflecting a medium severity level, with the vector indicating network attack vector (AV:N), low attack complexity (AC:L), requiring high privileges (PR:H), user interaction required (UI:R), scope changed (S:C), and low impact on confidentiality and integrity, with no impact on availability. The vulnerability allows an attacker with admin privileges to store malicious JavaScript payloads that execute in the context of other users viewing affected pages, potentially leading to session hijacking, privilege escalation, or other malicious actions. Although no known exploits are currently reported in the wild, the risk remains significant in environments where the plugin is installed and used. The lack of available patches at the time of publication increases the urgency for administrators to apply mitigations or consider alternative plugins. This vulnerability specifically targets WordPress sites using the Top Comments plugin, which may be niche but still relevant for affected sites.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to websites running WordPress with the Top Comments plugin installed. Exploitation could lead to unauthorized script execution in the browsers of users with access to the affected admin interfaces or multisite environments, potentially compromising session tokens, enabling privilege escalation, or facilitating further attacks such as phishing or malware distribution. Given the widespread use of WordPress across Europe for corporate, governmental, and small business websites, any site using this plugin could be at risk. The impact on confidentiality and integrity is low to medium, but the scope could be significant if exploited in multisite environments where many subsites are managed centrally. Additionally, compromised administrative accounts could lead to broader system compromise or data breaches, which would have regulatory implications under GDPR and other European data protection laws. The requirement for high privileges and user interaction limits the attack surface but does not eliminate risk, especially in environments with multiple administrators or editors.

Mitigation Recommendations

1. Immediately audit all WordPress installations for the presence of the Top Comments plugin and identify versions in use. 2. Disable or uninstall the Top Comments plugin until a security patch is released. 3. Restrict administrative privileges to trusted users only and review user roles to minimize the number of high-privilege accounts. 4. Implement Content Security Policy (CSP) headers to reduce the impact of potential XSS attacks by restricting script execution sources. 5. Monitor administrative activity logs for suspicious behavior that could indicate exploitation attempts. 6. Educate administrators about the risks of stored XSS and encourage cautious handling of plugin settings and inputs. 7. Regularly update WordPress core and plugins to incorporate security patches as soon as they become available. 8. Consider deploying Web Application Firewalls (WAFs) with rules to detect and block XSS payloads targeting plugin-specific parameters. 9. In multisite environments, apply additional scrutiny to plugin usage and user capabilities to prevent privilege abuse.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
WPScan
Date Reserved
2024-12-20T21:01:42.468Z
Cisa Enriched
false
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682cd0fa1484d88663aec206

Added to database: 5/20/2025, 6:59:06 PM

Last enriched: 7/4/2025, 7:40:37 AM

Last updated: 7/28/2025, 11:01:32 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats