CVE-2024-7311

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in Online Bus Reservation Site 1.0 allows remote attackers to execute arbitrary SQL commands via the Email parameter in register.php. Attackers can potentially access, modify, or delete database contents. All deployments of this specific software version are affected.

💻 Affected Systems

Products:
  • Online Bus Reservation Site
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the register.php file specifically. Any deployment with this version is vulnerable.

📦 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 if database functions allow it.

🟠

Likely Case

Unauthorized data access, user information theft, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to non-sensitive data.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and affects a web application component.
🏢 Internal Only: MEDIUM - Internal users could exploit this, but external attackers pose greater risk.

🎯 Exploit Status

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

Exploit details are publicly available, making this easy to weaponize. The vulnerability is in a registration endpoint which is typically unauthenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

No official patch available. Consider implementing parameterized queries and input validation as workaround.

🔧 Temporary Workarounds

Implement Parameterized Queries

all

Replace direct SQL concatenation with prepared statements in register.php

Edit register.php to use PDO or mysqli prepared statements for all database queries involving user input

Input Validation and Sanitization

all

Add strict validation for Email parameter before processing

Add validation: filter_var($email, FILTER_VALIDATE_EMAIL) and mysqli_real_escape_string() or equivalent

🧯 If You Can't Patch

  • Implement WAF rules to block SQL injection patterns targeting register.php
  • Restrict database user permissions to minimum required operations

🔍 How to Verify

Check if Vulnerable:

Test register.php endpoint with SQL injection payloads in Email parameter: ' OR '1'='1

Check Version:

Check software version in documentation or configuration files

Verify Fix Applied:

Test with same payloads and verify they are rejected or sanitized properly

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple registration attempts with suspicious Email parameters
  • Database query errors containing SQL syntax

Network Indicators:

  • HTTP POST requests to register.php with SQL keywords in parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/register.php" AND (param="Email" AND value MATCHES "'.*OR.*|'.*AND.*|'.*UNION.*")

🔗 References

📤 Share & Export