CVE-2025-6333

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul Directory Management System 2.0 allows remote attackers to execute arbitrary SQL commands via the adminname parameter in /admin/admin-profile.php. This can lead to unauthorized data access, modification, or deletion. All systems running the affected version are vulnerable.

💻 Affected Systems

Products:
  • PHPGurukul Directory Management System
Versions: 2.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires admin access to reach /admin/admin-profile.php, but SQL injection can be exploited by any user with admin privileges or through session hijacking.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, privilege escalation to admin, and potential system takeover via SQL injection to RCE chaining.

🟠

Likely Case

Unauthorized access to sensitive directory data, user credential theft, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and WAF rules blocking SQL injection patterns.

🌐 Internet-Facing: HIGH - Remote exploitation possible without authentication, making internet-facing instances immediate targets.
🏢 Internal Only: HIGH - Even internal systems are vulnerable to authenticated or network-accessible attacks.

🎯 Exploit Status

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

Exploit details are publicly available on GitHub, making weaponization straightforward for attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch available. Consider migrating to a supported version or implementing workarounds.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement parameterized queries or proper input sanitization for the adminname parameter in admin-profile.php

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

Web Application Firewall Rules

all

Deploy WAF rules to block SQL injection patterns targeting admin-profile.php

Add WAF rule: Block requests to /admin/admin-profile.php containing SQL keywords like UNION, SELECT, INSERT, DELETE, DROP, OR 1=1

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls, limiting access to trusted IPs only
  • Implement network segmentation to prevent lateral movement if the system is compromised

🔍 How to Verify

Check if Vulnerable:

Test the admin-profile.php endpoint with SQL injection payloads in the adminname parameter (e.g., adminname=admin' OR '1'='1)

Check Version:

Check application version in admin panel or review source code for version markers

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and return error messages or are properly sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin panel
  • Requests to admin-profile.php with SQL keywords in parameters

Network Indicators:

  • HTTP POST requests to /admin/admin-profile.php containing SQL injection patterns
  • Unusual outbound database connections from web server

SIEM Query:

source="web_logs" AND uri="/admin/admin-profile.php" AND (param="*UNION*" OR param="*SELECT*" OR param="*OR 1=1*")

🔗 References

📤 Share & Export