CVE-2025-46052

9.8 CRITICAL

📋 TL;DR

An error-based SQL injection vulnerability in WebERP v4.15.2 allows attackers to execute arbitrary SQL commands by injecting malicious payloads into the DEL form field in POST requests to /StockCounts.php. This enables extraction of sensitive database information including user credentials, financial data, and business records. All organizations running vulnerable WebERP installations are affected.

💻 Affected Systems

Products:
  • WebERP
Versions: v4.15.2 (specific version mentioned in CVE)
Operating Systems: All platforms running WebERP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and configuration of WebERP v4.15.2. No special configuration is required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data exfiltration, privilege escalation, authentication bypass, and potential remote code execution through database functions.

🟠

Likely Case

Extraction of sensitive business data, user credentials, financial records, and customer information leading to data breach and business disruption.

🟢

If Mitigated

Limited data exposure if proper input validation and database permissions are implemented, but still represents significant security risk.

🌐 Internet-Facing: HIGH - WebERP is typically deployed as a web application accessible over networks, making internet-facing instances immediately vulnerable to automated attacks.
🏢 Internal Only: HIGH - Even internally deployed instances are vulnerable to insider threats, compromised internal systems, or lateral movement from other breaches.

🎯 Exploit Status

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

The vulnerability requires no authentication and has publicly available proof-of-concept code, making it trivial for attackers to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.weberp.org/

Restart Required: No

Instructions:

1. Monitor WebERP vendor website for security updates. 2. Apply any available patches immediately. 3. Consider upgrading to a newer version if available. 4. Implement input validation and parameterized queries as temporary mitigation.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to reject malicious SQL characters in the DEL parameter

# Example PHP input validation
$del_param = $_POST['DEL'];
if (!preg_match('/^[a-zA-Z0-9_]+$/', $del_param)) {
    die('Invalid input');
}

Web Application Firewall Rules

linux

Deploy WAF rules to block SQL injection patterns in POST requests to /StockCounts.php

# Example ModSecurity rule
SecRule ARGS_POST:DEL "@rx (union|select|insert|update|delete|drop|create|alter)" \
    "id:1001,phase:2,deny,status:403,msg:'SQLi attempt detected'"

🧯 If You Can't Patch

  • Implement network segmentation to isolate WebERP from internet access
  • Deploy a web application firewall with SQL injection detection rules

🔍 How to Verify

Check if Vulnerable:

Send a POST request to /StockCounts.php with DEL parameter containing SQL injection payload like ' OR '1'='1 and observe database error responses

Check Version:

# Check WebERP version
cat /path/to/weberp/ChangeLog | grep -i version
# Or check config files for version information

Verify Fix Applied:

Test with same SQL injection payloads and verify they are rejected or sanitized without database errors

📡 Detection & Monitoring

Log Indicators:

  • POST requests to /StockCounts.php with unusual DEL parameter values
  • Database error messages in application logs containing SQL syntax errors
  • Multiple failed login attempts following SQL injection attempts

Network Indicators:

  • Unusual database query patterns from web server
  • Large data transfers from database to external IPs
  • SQL keywords in POST request parameters

SIEM Query:

source="web_server_logs" AND uri_path="/StockCounts.php" AND (DEL="*union*" OR DEL="*select*" OR DEL="*insert*" OR DEL="*' OR '*" OR DEL="*;--*")

🔗 References

📤 Share & Export