CVE-2023-31945

7.2 HIGH

📋 TL;DR

This SQL injection vulnerability in Online Travel Agency System v1.0 allows remote attackers to execute arbitrary SQL commands via the id parameter in daily_expenditure_edit.php. Attackers can potentially read, modify, or delete database contents, and in some configurations execute operating system commands. All deployments of this specific software version are affected.

💻 Affected Systems

Products:
  • Online Travel Agency System
Versions: v1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable. The vulnerability exists in the daily_expenditure_edit.php file.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized data access and modification, potentially including sensitive customer information, booking data, and financial records.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The exploit requires no authentication and is simple to execute with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Implement workarounds or migrate to a different travel agency system.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Modify daily_expenditure_edit.php to validate the id parameter and use prepared statements

Replace vulnerable SQL queries with parameterized queries using PDO or mysqli prepared statements

Web Application Firewall (WAF)

all

Deploy a WAF to block SQL injection attempts

Configure WAF rules to block SQL injection patterns in URL parameters

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement network segmentation to limit database server access

🔍 How to Verify

Check if Vulnerable:

Test the daily_expenditure_edit.php endpoint with SQL injection payloads in the id parameter

Check Version:

Check the software version in the system configuration or about page

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and that parameterized queries are implemented

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in web server logs
  • Unusual database queries from web application
  • Multiple failed parameter validation attempts

Network Indicators:

  • HTTP requests to daily_expenditure_edit.php with SQL keywords in parameters
  • Unusual database connection patterns

SIEM Query:

source="web_server.log" AND ("daily_expenditure_edit.php" AND ("UNION" OR "SELECT" OR "INSERT" OR "DELETE" OR "UPDATE"))

🔗 References

📤 Share & Export