CVE-2025-3188

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul e-Diary Management System 1.0 allows attackers to manipulate database queries through the Category parameter in /add-notes.php. Attackers can potentially read, modify, or delete sensitive data from the database. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • PHPGurukul e-Diary Management System
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires PHP environment with database backend (typically MySQL/MariaDB).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, or complete system takeover via SQL injection to remote code execution.

🟠

Likely Case

Unauthorized access to sensitive student/teacher data, grade manipulation, or system disruption.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to non-critical data.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit available on GitHub, SQL injection via Category parameter requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch available. Consider migrating to alternative software or implementing workarounds.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Modify /add-notes.php to use prepared statements and validate Category parameter

Replace SQL queries with prepared statements using PDO or mysqli

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

Configure WAF to block requests containing SQL keywords in Category parameter

🧯 If You Can't Patch

  • Disable or restrict access to /add-notes.php endpoint
  • Implement network segmentation and restrict database access to application server only

🔍 How to Verify

Check if Vulnerable:

Test /add-notes.php with SQL injection payloads in Category parameter (e.g., Category=1' OR '1'='1)

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Verify prepared statements are implemented and test with SQL injection payloads returns error or no data leakage

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts following SQL injection patterns
  • Unexpected database queries from web server

Network Indicators:

  • HTTP POST requests to /add-notes.php with SQL keywords in parameters
  • Unusual database traffic patterns from web server

SIEM Query:

source="web_logs" AND uri="/add-notes.php" AND (param="Category" AND value MATCHES "(?i)(union|select|insert|update|delete|drop|--|#|/*)")

🔗 References

📤 Share & Export