A significant security flaw has been uncovered in the WP Visitor Statistics (Real Time Traffic) WordPress plugin. Identified as CVE-2021-25042, this vulnerability allows attackers to perform Cross-Site Scripting (XSS) attacks, posing a considerable risk to websites using affected versions of the plugin. It highlights the critical importance of keeping all WordPress components up to date.
Understanding the Vulnerability
The core of this issue lies in the plugin's “updateIpAddress” AJAX action. This function, intended for managing IP address exclusions, lacked proper authorization and Cross-Site Request Forgery (CSRF) checks. This oversight meant that any authenticated user could add an arbitrary IP address to the exclusion list. More alarmingly, due to insufficient input validation, sanitization, and escaping, malicious code could be injected into these IP address entries.
When a logged-in administrator subsequently viewed this exclusion list, the embedded malicious code would execute in their browser. This type of Cross-Site Scripting (XSS) attack could lead to unauthorized actions being performed on behalf of the administrator, data theft, or complete compromise of the website.
CVE Details
- Product Name: WP Visitor Statistics (Real Time Traffic) WordPress Plugin
- CVE ID: CVE-2021-25042
- Published Date: January 31, 2022
- Severity: High
- Status: Analyzed
Affected Products
The vulnerability impacts versions of the WP Visitor Statistics (Real Time Traffic) WordPress plugin earlier than 5.5. If your WordPress site uses this plugin and is running any version prior to 5.5, it is susceptible to this attack.
Current Status
This vulnerability has been thoroughly analyzed and documented. This means that its nature, impact, and the necessary steps for remediation are well understood. A fix has been released by the plugin developer.
Severity Level
Rated with a "High" severity and a CVSS score of 8.0, this vulnerability presents a significant threat. The ease with which it can be exploited by an authenticated user, combined with the potential for administrative account compromise via XSS, makes it a critical concern for site administrators. Such attacks can bypass security measures and directly affect the integrity and confidentiality of your website data.
Possible Solutions
To protect your WordPress website from CVE-2021-25042, immediate action is required:
- Update Your Plugin: The most crucial step is to update the WP Visitor Statistics (Real Time Traffic) plugin to version 5.5 or later. This version contains the necessary fixes to address the authorization, CSRF, and input validation flaws.
- Regular Updates: Always ensure all your WordPress plugins, themes, and the core WordPress software are kept up to date. This practice is fundamental to maintaining a secure online presence.
- Web Application Firewall (WAF): Deploying a robust Web Application Firewall (WAF) can add an extra layer of defense by filtering out malicious traffic before it reaches your website.
- Security Best Practices: Review your overall WordPress Security Best Practices. Educate your team on understanding Cross-Site Scripting (XSS) and how to prevent it.
References
- https://wpscan.com/vulnerability/05b9e478-2d3b-4460-88c1-7f81d3a68ac4
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25042


