CVE-2025-8165

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in Food Review System 1.0 allows remote attackers to execute arbitrary SQL commands via the 'occasion' parameter in /admin/approve_reservation.php. This can lead to data theft, modification, or deletion. Organizations using this specific version of the software are affected.

💻 Affected Systems

Products:
  • Food Review System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with the vulnerable /admin/approve_reservation.php file accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including sensitive data exfiltration, privilege escalation to admin, and potential system takeover via SQL injection leading to remote code execution.

🟠

Likely Case

Unauthorized access to reservation data, user information theft, and potential manipulation of food review content.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit requires admin access to reach the vulnerable endpoint, but SQL injection itself is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://code-projects.org/

Restart Required: No

Instructions:

1. Check vendor website for updates. 2. If no patch available, implement workarounds. 3. Consider replacing with alternative software.

🔧 Temporary Workarounds

Input Validation Filter

all

Add parameter validation to filter SQL injection attempts in the 'occasion' parameter

Modify /admin/approve_reservation.php to sanitize input using prepared statements or parameterized queries

Access Restriction

linux

Restrict access to the vulnerable admin endpoint

Add IP whitelisting to .htaccess: Order Deny,Allow
Deny from all
Allow from 192.168.1.0/24

🧯 If You Can't Patch

  • Implement web application firewall (WAF) with SQL injection rules
  • Disable or remove the /admin/approve_reservation.php file if not needed

🔍 How to Verify

Check if Vulnerable:

Test the 'occasion' parameter in /admin/approve_reservation.php with SQL injection payloads like ' OR '1'='1

Check Version:

Check software documentation or configuration files for version information

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and return proper error handling

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin panel
  • Suspicious 'occasion' parameter values in web logs

Network Indicators:

  • SQL error messages in HTTP responses
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/admin/approve_reservation.php" AND (param="occasion" AND value MATCH "'|--|;|UNION|SELECT")

🔗 References

📤 Share & Export