CVE-2024-31961

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in Sonic Shopfloor.guide's unit.php allows remote attackers to execute arbitrary SQL commands via the level2 parameter. Attackers can potentially access, modify, or delete database content. All systems running vulnerable versions are affected.

💻 Affected Systems

Products:
  • Sonic Shopfloor.guide
Versions: All versions before 3.1.3
Operating Systems: All supported platforms
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the default installation when the level2 parameter is accessible.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or full system takeover via SQL injection to RCE chaining.

🟠

Likely Case

Unauthorized data access, privilege escalation, or data manipulation in the Shopfloor.guide database.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database permission restrictions.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

SQL injection via HTTP parameter suggests straightforward exploitation with common SQLi tools.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.1.3

Vendor Advisory: https://bugs.sonic-technology.com/cve-2024-31961.html

Restart Required: Yes

Instructions:

1. Backup current installation and database. 2. Download version 3.1.3 from vendor. 3. Follow vendor upgrade instructions. 4. Restart application services. 5. Verify successful upgrade.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to reject malicious level2 parameter values

Implement regex validation: /^[a-zA-Z0-9_-]+$/ for level2 parameter

WAF Rule

all

Block SQL injection patterns targeting the level2 parameter

Add WAF rule: Detect SQL keywords in level2 parameter

🧯 If You Can't Patch

  • Implement strict input validation and parameterized queries in unit.php
  • Restrict network access to vulnerable systems using firewalls or network segmentation

🔍 How to Verify

Check if Vulnerable:

Check if version is below 3.1.3 and if unit.php accepts level2 parameter without validation

Check Version:

Check application version in admin interface or configuration files

Verify Fix Applied:

Confirm version is 3.1.3 or higher and test level2 parameter with SQL injection payloads

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts after level2 parameter manipulation
  • HTTP requests with SQL keywords in level2 parameter

Network Indicators:

  • Unusual database connection patterns from web server
  • HTTP requests containing SQL injection payloads

SIEM Query:

source="web_logs" AND (level2 CONTAINS "UNION" OR level2 CONTAINS "SELECT" OR level2 CONTAINS "INSERT")

🔗 References

📤 Share & Export