CVE-2024-6471

6.3 MEDIUM

📋 TL;DR

This is a critical SQL injection vulnerability in SourceCodester Online Tours & Travels Management System 1.0 that allows remote attackers to execute arbitrary SQL commands via the 'uname' parameter in sms_setting.php. Attackers can potentially access, modify, or delete database content. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • SourceCodester Online Tours & Travels Management System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Any installation with sms_setting.php accessible is vulnerable; no special configuration required.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, authentication bypass, and potential server takeover via SQL injection to RCE chaining.

🟠

Likely Case

Unauthorized database access leading to sensitive data exposure (user credentials, personal information, financial data).

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only error messages or partial data exposure.

🌐 Internet-Facing: HIGH - Attack can be initiated remotely without authentication, making internet-facing instances extremely vulnerable.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but require network access; risk depends on internal threat landscape.

🎯 Exploit Status

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

Exploit details are publicly available; SQL injection is well-understood and easily weaponized with automated tools.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider: 1) Contact SourceCodester for updates 2) Apply manual fixes to sms_setting.php 3) Consider alternative software if no fix is forthcoming.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Modify sms_setting.php to use prepared statements with parameterized queries instead of direct string concatenation.

Edit sms_setting.php to replace vulnerable SQL queries with PDO or mysqli prepared statements

Access Restriction

linux

Restrict access to sms_setting.php file via web server configuration or firewall rules.

# Apache: Add to .htaccess
<Files "sms_setting.php">
Order deny,allow
Deny from all
</Files>
# Nginx: Add to server block
location ~ /sms_setting\.php$ { deny all; }

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) with SQL injection rules
  • Isolate the system in a segmented network with strict access controls

🔍 How to Verify

Check if Vulnerable:

Test the sms_setting.php endpoint with SQL injection payloads in the 'uname' parameter and observe database errors or unexpected behavior.

Check Version:

Check the software version in admin panel or configuration files; look for version 1.0 in source code or documentation.

Verify Fix Applied:

After applying fixes, test with the same SQL injection payloads and verify no database errors occur and input is properly sanitized.

📡 Detection & Monitoring

Log Indicators:

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

Network Indicators:

  • HTTP requests to sms_setting.php with SQL keywords in parameters
  • Unusual database traffic patterns from web server

SIEM Query:

web.url: *sms_setting.php AND (web.param: *OR* OR web.param: *UNION* OR web.param: *SELECT* OR web.param: *--*)

🔗 References

📤 Share & Export