CVE-2022-31347

9.8 CRITICAL

📋 TL;DR

Online Car Wash Booking System v1.0 contains a SQL injection vulnerability in the delete_vehicle function that allows attackers to execute arbitrary SQL commands. This affects all systems running this specific software version. Attackers can potentially access, modify, or delete database content.

💻 Affected Systems

Products:
  • Online Car Wash Booking System
Versions: v1.0
Operating Systems: Any
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the web application specifically at the /ocwbs/classes/Master.php endpoint with f=delete_vehicle parameter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, authentication bypass, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized data access and modification, potential user data exposure, and system disruption.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only error messages or minor data exposure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public proof-of-concept available on GitHub. SQL injection is a well-known attack vector with many automated tools available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

No official patch available. Consider implementing parameterized queries or input validation as described in workarounds.

🔧 Temporary Workarounds

Implement Parameterized Queries

all

Modify Master.php to use prepared statements with parameter binding instead of concatenating user input into SQL queries.

Edit /ocwbs/classes/Master.php to replace vulnerable SQL construction with PDO or mysqli prepared statements

Input Validation and Sanitization

all

Add strict input validation for the delete_vehicle parameter to only accept expected values.

Add validation: if(!is_numeric($_GET['id'])) { die('Invalid input'); }

🧯 If You Can't Patch

  • Implement web application firewall (WAF) with SQL injection rules
  • Restrict network access to the application, isolate it from sensitive systems

🔍 How to Verify

Check if Vulnerable:

Test the endpoint with SQL injection payloads: /ocwbs/classes/Master.php?f=delete_vehicle&id=1' OR '1'='1

Check Version:

Check application version in admin panel or configuration files

Verify Fix Applied:

Test with same payloads and verify they are rejected or properly handled without SQL execution.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in logs
  • Multiple failed delete_vehicle requests with SQL syntax

Network Indicators:

  • HTTP requests to Master.php with SQL keywords in parameters
  • Unusual database query patterns

SIEM Query:

web.url:*Master.php* AND (web.param:*OR* OR web.param:*UNION* OR web.param:*SELECT*)

🔗 References

📤 Share & Export