CVE-2020-29287

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in Car Rental Management System v1.0 allows attackers to execute arbitrary SQL commands via the id parameter in view_car.php or car_id parameter in booking.php. This affects all deployments of this specific software version, potentially compromising the entire database.

💻 Affected Systems

Products:
  • Car Rental Management System
Versions: v1.0
Operating Systems: Any OS running PHP with MySQL
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of v1.0 as the vulnerable code is in core files.

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

🟠

Likely Case

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

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit code is publicly available and requires minimal technical skill to execute.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch exists. Replace vulnerable code with parameterized queries in view_car.php and booking.php files.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add input validation to ensure id and car_id parameters are numeric and within expected ranges.

Modify PHP code to validate $_GET['id'] and $_GET['car_id'] parameters

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns targeting id and car_id parameters.

Configure WAF to block SQL injection patterns in URL parameters

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only.
  • Implement strict network segmentation and monitor all database access attempts.

🔍 How to Verify

Check if Vulnerable:

Test view_car.php?id=1' OR '1'='1 and booking.php?car_id=1' OR '1'='1 for SQL error responses.

Check Version:

Check PHP files for version comments or compare file hashes with original v1.0 release.

Verify Fix Applied:

Test the same SQL injection attempts and verify they return proper error messages or no database errors.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in PHP logs
  • Multiple failed parameter validation attempts
  • Suspicious patterns in access logs (single quotes, SQL keywords)

Network Indicators:

  • HTTP requests with SQL injection patterns in id/car_id parameters
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND (uri="*view_car.php*" OR uri="*booking.php*") AND (param="*' OR*" OR param="*UNION*" OR param="*SELECT*" OR param="*--*" OR param="*;*" OR param="*/*")

🔗 References

📤 Share & Export