CVE-2025-6913

6.3 MEDIUM

📋 TL;DR

A critical SQL injection vulnerability exists in PHPGurukul Student Record System 3.2 through the /admin-profile.php file's aemailid parameter. This allows remote attackers to execute arbitrary SQL commands on the database. All installations of version 3.2 with the vulnerable component exposed are affected.

💻 Affected Systems

Products:
  • PHPGurukul Student Record System
Versions: 3.2
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the /admin-profile.php file to be accessible and the aemailid parameter to be exposed in requests.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, privilege escalation, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized access to sensitive student and administrative data, potential authentication bypass, and database manipulation.

🟢

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 on GitHub, making this easily exploitable by attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

1. Check vendor website for security updates. 2. If patch available, download and apply. 3. Test functionality after patching.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement proper input validation and parameterized queries for the aemailid parameter in admin-profile.php

Modify PHP code to use prepared statements: $stmt = $conn->prepare('SELECT * FROM admin WHERE email = ?'); $stmt->bind_param('s', $aemailid);

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns targeting the aemailid parameter

Configure WAF to block requests containing SQL keywords in aemailid parameter

🧯 If You Can't Patch

  • Restrict access to /admin-profile.php to trusted IP addresses only
  • Implement database user with minimal privileges for the application

🔍 How to Verify

Check if Vulnerable:

Test the aemailid parameter with SQL injection payloads like ' OR '1'='1 and observe database errors or unexpected behavior

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Test with same payloads after remediation - should return proper error handling without database errors

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in application logs
  • Unusual database queries from web server IP
  • Multiple failed login attempts with SQL patterns

Network Indicators:

  • HTTP requests to /admin-profile.php with SQL keywords in parameters
  • Unusual database traffic patterns

SIEM Query:

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

🔗 References

📤 Share & Export