CVE-2025-8469

7.3 HIGH

📋 TL;DR

A critical SQL injection vulnerability in SourceCodester Online Hotel Reservation System 1.0 allows remote attackers to execute arbitrary SQL commands via the ID parameter in /admin/deletegallery.php. This affects all deployments of version 1.0, potentially compromising the entire database and system. Attackers can exploit this without authentication to steal, modify, or delete sensitive hotel reservation data.

💻 Affected Systems

Products:
  • SourceCodester Online Hotel Reservation System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable. The /admin/deletegallery.php file is part of the standard installation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, privilege escalation to admin, and potential remote code execution via database functions.

🟠

Likely Case

Unauthenticated attackers extracting sensitive guest information (personal data, payment details), modifying reservations, and gaining administrative access to the system.

🟢

If Mitigated

Limited impact if proper input validation and parameterized queries are implemented, with database permissions restricted to prevent data manipulation.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable without authentication and affects a web-facing application component.
🏢 Internal Only: MEDIUM - While still dangerous internally, external exposure significantly increases attack surface and likelihood of exploitation.

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. The SQL injection is straightforward with no authentication required, making weaponization highly probable.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.sourcecodester.com/

Restart Required: No

Instructions:

No official patch available. Check vendor website for updates. Consider implementing parameterized queries and input validation in /admin/deletegallery.php.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation to ensure ID parameter contains only numeric values before processing.

Modify /admin/deletegallery.php to include: if(!is_numeric($_GET['ID'])) { die('Invalid input'); }

Web Application Firewall (WAF) Rules

all

Deploy WAF rules to block SQL injection patterns targeting the deletegallery.php endpoint.

Add WAF rule: Block requests to /admin/deletegallery.php with non-numeric ID parameters or SQL keywords in ID parameter

🧯 If You Can't Patch

  • Restrict access to /admin/ directory using IP whitelisting or authentication requirements
  • Disable or rename /admin/deletegallery.php file if functionality is not required

🔍 How to Verify

Check if Vulnerable:

Test by sending a request to /admin/deletegallery.php?ID=1' OR '1'='1 and checking for SQL errors or unexpected behavior.

Check Version:

Check the software version in admin panel or review source code comments for version 1.0 indicators.

Verify Fix Applied:

After implementing fixes, test with malicious payloads to confirm they are rejected or properly handled without SQL execution.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple requests to /admin/deletegallery.php with suspicious ID parameters
  • Failed login attempts followed by deletegallery.php access

Network Indicators:

  • HTTP requests containing SQL keywords (UNION, SELECT, INSERT) in URL parameters
  • Unusual traffic patterns to admin endpoints from external IPs

SIEM Query:

source="web_logs" AND (url="/admin/deletegallery.php" AND (query="*'*" OR query="*OR*" OR query="*UNION*"))

🔗 References

📤 Share & Export