CVE-2023-30415

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in Packers and Movers Management System v1.0 allows attackers to execute arbitrary SQL commands via the id parameter in /inquiries/view_inquiry.php. This affects all users running the vulnerable version of this web application, potentially leading to complete database compromise.

💻 Affected Systems

Products:
  • Sourcecodester Packers and Movers Management System
Versions: v1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of v1.0. The vulnerability is in the core application code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution if database permissions allow.

🟠

Likely Case

Database information disclosure, data manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit details available. SQL injection via GET parameter requires minimal technical skill to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available, or implement workarounds.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add input validation to ensure id parameter contains only numeric values

Modify /inquiries/view_inquiry.php to validate id parameter: if(!is_numeric($_GET['id'])) { die('Invalid input'); }

Implement Parameterized Queries

all

Replace direct SQL concatenation with prepared statements

Replace: $sql = "SELECT * FROM inquiries WHERE id = " . $_GET['id']; with prepared statement using mysqli or PDO

🧯 If You Can't Patch

  • Implement web application firewall (WAF) with SQL injection rules
  • Restrict access to /inquiries/view_inquiry.php to authorized users only

🔍 How to Verify

Check if Vulnerable:

Test /inquiries/view_inquiry.php?id=1' OR '1'='1 and observe if SQL error or unexpected behavior occurs

Check Version:

Check application version in admin panel or readme files

Verify Fix Applied:

Test with SQL injection payloads after implementing fixes to ensure they are rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /inquiries/view_inquiry.php with SQL-like payloads

Network Indicators:

  • HTTP requests containing SQL keywords (UNION, SELECT, etc.) in id parameter

SIEM Query:

source="web_logs" AND uri="/inquiries/view_inquiry.php" AND (query="*UNION*" OR query="*SELECT*" OR query="*OR '1'='1*")

🔗 References

📤 Share & Export