CVE-2024-3356

7.3 HIGH

📋 TL;DR

This is a critical SQL injection vulnerability in SourceCodester Aplaya Beach Resort Online Reservation System 1.0. Attackers can remotely exploit the admin/mod_settings/controller.php?action=add endpoint by manipulating the 'type' parameter to execute arbitrary SQL commands. All deployments of this specific software version are affected.

💻 Affected Systems

Products:
  • SourceCodester Aplaya Beach Resort Online Reservation System
Versions: 1.0
Operating Systems: Any OS running PHP/MySQL
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable. No specific configuration required for exploitation.

📦 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 via database functions.

🟠

Likely Case

Unauthorized access to sensitive reservation data, customer PII exposure, and potential administrative account takeover.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database permission restrictions in place.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and the system is designed for online reservations.
🏢 Internal Only: MEDIUM - Internal deployments still vulnerable but attack surface is reduced.

🎯 Exploit Status

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

Exploit code is publicly available on GitHub. Attack requires access to admin interface but may be combined with other vulnerabilities.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider migrating to alternative software or implementing custom fixes with parameterized queries.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize the 'type' parameter before processing

Add PHP validation: if(!preg_match('/^[a-zA-Z0-9_]+$/', $_GET['type'])) { die('Invalid input'); }

WAF Rule Implementation

all

Block SQL injection patterns targeting the vulnerable endpoint

WAF rule: deny requests to */admin/mod_settings/controller.php?action=add* containing SQL keywords

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement database-level protections: restrict application database user permissions

🔍 How to Verify

Check if Vulnerable:

Test the endpoint with SQL injection payloads: /admin/mod_settings/controller.php?action=add&type=1' OR '1'='1

Check Version:

Check software version in admin panel or readme files

Verify Fix Applied:

Test with same payloads and verify proper error handling or rejection

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts followed by admin access
  • Requests to vulnerable endpoint with SQL keywords

Network Indicators:

  • HTTP requests containing SQL injection patterns to the vulnerable URL
  • Unusual database query patterns from application server

SIEM Query:

source="web_logs" AND url="*controller.php?action=add*" AND (query="*UNION*" OR query="*SELECT*" OR query="*OR '1'='1*")

🔗 References

📤 Share & Export