CVE-2022-38074

9.9 CRITICAL

📋 TL;DR

CVE-2022-38074 is a SQL injection vulnerability in the VeronaLabs WP Statistics WordPress plugin that allows authenticated attackers to execute arbitrary SQL commands. This affects WordPress sites running WP Statistics version 13.2.10 or earlier. Successful exploitation could lead to data theft, data manipulation, or complete database compromise.

💻 Affected Systems

Products:
  • VeronaLabs WP Statistics WordPress Plugin
Versions: <= 13.2.10
Operating Systems: All operating systems running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user access, but multiple user roles may be vulnerable depending on plugin configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including sensitive user data, admin credential theft, and potential privilege escalation to full site control.

🟠

Likely Case

Data exfiltration of sensitive information from the WordPress database, including user credentials and site content.

🟢

If Mitigated

Limited impact if proper input validation and prepared statements are implemented, restricting SQL command execution.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access but SQL injection payloads are well-documented and easy to weaponize.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 13.2.11

Vendor Advisory: https://wordpress.org/plugins/wp-statistics/#developers

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Temporary Plugin Deactivation

all

Disable the WP Statistics plugin until patched

wp plugin deactivate wp-statistics

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns targeting WP Statistics endpoints

🧯 If You Can't Patch

  • Restrict plugin access to trusted users only and implement principle of least privilege
  • Implement database-level controls including read-only database user accounts for the plugin

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > WP Statistics version number

Check Version:

wp plugin get wp-statistics --field=version

Verify Fix Applied:

Verify WP Statistics version is 13.2.11 or higher in WordPress admin

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in WordPress or database logs
  • Multiple failed authentication attempts followed by SQL-like payloads

Network Indicators:

  • POST requests to /wp-admin/admin-ajax.php with SQL injection patterns
  • Unusual database connection patterns from web server

SIEM Query:

source="wordpress.log" AND "wp-statistics" AND ("UNION" OR "SELECT" OR "INSERT" OR "UPDATE" OR "DELETE")

🔗 References

📤 Share & Export