CVE-2022-25305

7.2 HIGH

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts into the WP Statistics WordPress plugin's IP parameter. When site administrators view statistics pages, these scripts execute in their browsers, potentially compromising administrative accounts. All WordPress sites using WP Statistics versions up to 13.1.5 are affected.

💻 Affected Systems

Products:
  • WP Statistics WordPress Plugin
Versions: Up to and including 13.1.5
Operating Systems: All operating systems running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the plugin to be installed and active. The vulnerability triggers when administrators view statistics pages.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain administrative access to WordPress sites, leading to complete site takeover, data theft, malware distribution, or ransomware deployment.

🟠

Likely Case

Attackers steal administrator session cookies or credentials, enabling unauthorized access to the WordPress dashboard and subsequent malicious actions.

🟢

If Mitigated

With proper input validation and output escaping, the attack fails, and administrators see sanitized IP data without script execution.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires tricking administrators into viewing maliciously crafted statistics pages. Public proof-of-concept code exists in GitHub gists.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 13.1.6 and later

Vendor Advisory: https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=2679983%40wp-statistics&new=2679983%40wp-statistics&sfp_email=&sfph_mail=

Restart Required: No

Instructions:

1. Log into WordPress admin dashboard. 2. Navigate to Plugins > Installed Plugins. 3. Find WP Statistics and click 'Update Now'. 4. Verify version is 13.1.6 or higher.

🔧 Temporary Workarounds

Disable WP Statistics Plugin

all

Temporarily deactivate the plugin to prevent exploitation while planning an update.

wp plugin deactivate wp-statistics

Restrict Admin Access

linux

Limit access to statistics pages to trusted IP addresses using web server rules.

# Apache: Require ip 192.168.1.0/24
# Nginx: allow 192.168.1.0/24; deny all;

🧯 If You Can't Patch

  • Implement a Web Application Firewall (WAF) with XSS protection rules to block malicious payloads.
  • Monitor administrator account activity for unusual behavior and implement multi-factor authentication.

🔍 How to Verify

Check if Vulnerable:

Check the WP Statistics plugin version in WordPress admin under Plugins > Installed Plugins. If version is 13.1.5 or lower, the site is vulnerable.

Check Version:

wp plugin get wp-statistics --field=version

Verify Fix Applied:

After updating, confirm the plugin version shows 13.1.6 or higher in the WordPress plugins list.

📡 Detection & Monitoring

Log Indicators:

  • Unusual IP addresses with script-like characters in WP Statistics logs
  • Multiple failed login attempts following statistics page views

Network Indicators:

  • HTTP requests to statistics pages containing JavaScript in query parameters

SIEM Query:

source="wordpress.log" AND "wp-statistics" AND ("<script" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export