CVE-2024-6666

8.8 HIGH

📋 TL;DR

This SQL injection vulnerability in the WP ERP WordPress plugin allows authenticated attackers with Accounting Manager privileges to inject malicious SQL queries via the 'vendor_id' parameter. This can lead to unauthorized data extraction from the database, potentially exposing sensitive information. All WordPress sites using WP ERP versions up to 1.13.0 are affected.

💻 Affected Systems

Products:
  • WP ERP WordPress Plugin
Versions: All versions up to and including 1.13.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with Accounting Manager role (erp_ac_view_sales_summary capability) or higher privileges.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including extraction of sensitive user data, financial records, and potential privilege escalation to full site control.

🟠

Likely Case

Extraction of sensitive business data, customer information, and financial records from the database.

🟢

If Mitigated

Limited impact due to proper access controls and network segmentation, with only authorized users able to exploit the vulnerability.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but SQL injection is straightforward once authenticated with appropriate privileges.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.13.1

Vendor Advisory: https://plugins.trac.wordpress.org/changeset/3064874/erp/tags/1.13.1/modules/accounting/includes/functions/transactions.php

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find WP ERP plugin. 4. Click 'Update Now' if update is available. 5. Alternatively, download version 1.13.1+ from WordPress repository and manually update.

🔧 Temporary Workarounds

Temporary Access Restriction

all

Restrict access to Accounting Manager roles to trusted users only until patch is applied.

Web Application Firewall Rule

all

Implement WAF rules to block SQL injection patterns in vendor_id parameter.

🧯 If You Can't Patch

  • Implement strict principle of least privilege for Accounting Manager roles
  • Deploy network segmentation to isolate the WordPress instance from sensitive databases

🔍 How to Verify

Check if Vulnerable:

Check WP ERP plugin version in WordPress admin panel under Plugins → Installed Plugins.

Check Version:

wp plugin list --name='WP ERP' --field=version

Verify Fix Applied:

Verify plugin version is 1.13.1 or higher and review the transactions.php file for proper parameter sanitization.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts followed by Accounting Manager access
  • Unusual vendor_id parameter values in web server logs

Network Indicators:

  • SQL error messages in HTTP responses
  • Unusual database query patterns from WordPress instance

SIEM Query:

source="web_server" AND (vendor_id CONTAINS "' OR" OR vendor_id CONTAINS "UNION" OR vendor_id CONTAINS "SELECT")

🔗 References

📤 Share & Export