CVE-2025-3168

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul Time Table Generator System 1.0 allows remote attackers to execute arbitrary SQL commands via the editid parameter in /admin/edit-class.php. Attackers can potentially access, modify, or delete database content. Organizations using this specific version of the software are affected.

💻 Affected Systems

Products:
  • PHPGurukul Time Table Generator System
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the /admin/edit-class.php endpoint to be accessible. Default installations are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or full system takeover via SQL injection to RCE chaining.

🟠

Likely Case

Unauthorized access to sensitive timetable data, student/teacher information, and potential privilege escalation within the application.

🟢

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: ✅ No
Complexity: LOW

Exploit details are publicly available. Attack requires access to admin functionality but SQL injection is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add parameterized queries or proper input validation for the editid parameter in edit-class.php

Modify /admin/edit-class.php to use prepared statements: $stmt = $conn->prepare('SELECT * FROM classes WHERE id = ?'); $stmt->bind_param('i', $_GET['editid']);

Web Application Firewall Rules

all

Block SQL injection patterns targeting the editid parameter

WAF rule: SecRule ARGS:editid "@detectSQLi" "id:1001,phase:2,deny"

🧯 If You Can't Patch

  • Block external access to /admin/edit-class.php via firewall rules or web server configuration
  • Implement strict network segmentation to isolate the vulnerable system from sensitive data

🔍 How to Verify

Check if Vulnerable:

Test the /admin/edit-class.php?editid=1' endpoint for SQL error responses or time-based delays with malicious payloads

Check Version:

Check software version in admin panel or readme files

Verify Fix Applied:

Attempt SQL injection payloads against the patched endpoint and verify they are rejected or sanitized

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in web server logs
  • Unusual database queries from web application user
  • Multiple failed login attempts followed by edit-class.php access

Network Indicators:

  • HTTP requests to /admin/edit-class.php with SQL keywords in parameters
  • Unusual outbound database connections from web server

SIEM Query:

source="web_logs" AND uri="/admin/edit-class.php" AND (param="editid" AND value MATCHES "'.*[Ss][Ee][Ll][Ee][Cc][Tt].*'" OR value MATCHES ".*--.*")

🔗 References

📤 Share & Export