CVE-2023-45340

9.8 CRITICAL

📋 TL;DR

Online Food Ordering System v1.0 has unauthenticated SQL injection vulnerabilities in the 'phone' parameter of routers/details-router.php, allowing attackers to execute arbitrary SQL commands without authentication. This affects all deployments of this software version, potentially compromising the database and system integrity.

💻 Affected Systems

Products:
  • Online Food Ordering System
Versions: v1.0
Operating Systems: Any OS running the software
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of v1.0 are vulnerable due to lack of input filtering in the default code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full database compromise leading to data theft, data manipulation, or remote code execution on the server.

🟠

Likely Case

Unauthorized access to sensitive data like user credentials, orders, and personal information.

🟢

If Mitigated

Limited impact if input validation and parameterized queries are enforced, preventing SQL injection.

🌐 Internet-Facing: HIGH, as the vulnerability is unauthenticated and exploitable remotely over the internet.
🏢 Internal Only: MEDIUM, as internal attackers could still exploit it, but external exposure increases risk.

🎯 Exploit Status

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

Exploitation is straightforward with publicly available SQL injection techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No official vendor advisory found

Restart Required: No

Instructions:

No official patch; apply workarounds or upgrade if a newer version is released.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement server-side validation to filter or reject malicious characters in the 'phone' parameter.

Modify routers/details-router.php to add input sanitization, e.g., using prepared statements in PHP.

Web Application Firewall (WAF) Rules

all

Deploy a WAF to block SQL injection attempts targeting the vulnerable endpoint.

Configure WAF rules to detect and block patterns like SQL keywords in the 'phone' parameter.

🧯 If You Can't Patch

  • Disable or restrict access to the routers/details-router.php endpoint if not essential.
  • Monitor and log all access to the vulnerable endpoint for suspicious activity.

🔍 How to Verify

Check if Vulnerable:

Test the 'phone' parameter with SQL injection payloads, e.g., send a request to routers/details-router.php?phone=1' OR '1'='1 and check for database errors or unexpected responses.

Check Version:

Check the software version in the system's admin panel or configuration files.

Verify Fix Applied:

After applying fixes, retest with the same payloads to ensure no SQL errors or data leakage occurs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs, multiple failed login attempts, or unexpected database queries.

Network Indicators:

  • HTTP requests to routers/details-router.php with SQL injection patterns in parameters.

SIEM Query:

Example: source="web_logs" AND uri="/routers/details-router.php" AND (param="phone" AND value MATCHES "'.*OR.*'" OR value MATCHES ".*--.*")

🔗 References

📤 Share & Export