CVE-2023-27210

9.8 CRITICAL

📋 TL;DR

This CVE describes a SQL injection vulnerability in Online Pizza Ordering System 1.0, allowing attackers to execute arbitrary SQL commands via the 'id' parameter in /admin/view_order.php. It affects users running this specific software version, potentially leading to data theft, manipulation, or system compromise.

💻 Affected Systems

Products:
  • Online Pizza Ordering System
Versions: 1.0
Operating Systems: Any OS running PHP (commonly Linux, Windows)
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability is present in the default installation; no special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full database compromise, including extraction of sensitive data (e.g., user credentials, payment info), data deletion, or remote code execution leading to complete system takeover.

🟠

Likely Case

Unauthorized access to order and user data, potential privilege escalation, or disruption of system functionality.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries in place, preventing SQL injection attacks.

🌐 Internet-Facing: HIGH, as the vulnerability is exploitable via a web interface accessible over the internet, increasing exposure to attackers.
🏢 Internal Only: MEDIUM, as internal systems may still be targeted by insider threats or compromised internal devices, but external attack surface is reduced.

🎯 Exploit Status

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

Exploitation requires access to the admin interface; public proof-of-concept details are available, making it easier for attackers to weaponize.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch exists; apply workarounds or manually fix the code by implementing parameterized queries and input validation.

🔧 Temporary Workarounds

Implement Input Validation and Sanitization

all

Add server-side validation to sanitize the 'id' parameter, rejecting non-numeric inputs or using whitelisting.

Modify /admin/view_order.php to include: $id = intval($_GET['id']); // Sanitize as integer

Use Prepared Statements

all

Rewrite the SQL query in /admin/view_order.php to use parameterized queries (e.g., with PDO or MySQLi) to prevent injection.

Example for PDO: $stmt = $pdo->prepare('SELECT * FROM orders WHERE id = ?'); $stmt->execute([$id]);

🧯 If You Can't Patch

  • Restrict access to /admin/view_order.php using IP whitelisting or firewall rules to limit exposure.
  • Monitor and log all access attempts to the vulnerable endpoint for suspicious activity.

🔍 How to Verify

Check if Vulnerable:

Test the /admin/view_order.php endpoint with a malicious 'id' parameter (e.g., 'id=1' OR '1'='1') and check for SQL errors or unexpected data in the response.

Check Version:

Check the software version in the source code or documentation; typically found in files like README or config.php.

Verify Fix Applied:

After applying fixes, retest with the same malicious inputs; the system should handle them gracefully without errors or data leakage.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs (e.g., from PHP), repeated access attempts to /admin/view_order.php with varied 'id' parameters.

Network Indicators:

  • HTTP requests to /admin/view_order.php containing SQL keywords (e.g., UNION, SELECT, OR) in the 'id' parameter.

SIEM Query:

Example: source="web_logs" AND url="/admin/view_order.php" AND (id="*OR*" OR id="*UNION*" OR id="*SELECT*")

🔗 References

📤 Share & Export