CVE-2025-8157

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul User Registration & Login and User Management 3.3 allows remote attackers to execute arbitrary SQL commands via the ID parameter in /admin/lastthirtyays-reg-users.php. Organizations using this software are affected, potentially exposing sensitive user data and system access.

💻 Affected Systems

Products:
  • PHPGurukul User Registration & Login and User Management
Versions: 3.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the admin panel component specifically in the lastthirtyays-reg-users.php file.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, privilege escalation, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized access to user data, administrative credentials theft, and potential website defacement.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only error messages or partial data exposure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit disclosed publicly, requires admin panel access but SQL injection is straightforward to execute.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available, or implement workarounds.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Implement proper input validation and use parameterized queries/prepared statements for the ID parameter.

Modify /admin/lastthirtyays-reg-users.php to use prepared statements with PDO or mysqli

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns targeting the ID parameter.

Add WAF rule: deny requests with SQL keywords in ID parameter to /admin/lastthirtyays-reg-users.php

🧯 If You Can't Patch

  • Restrict access to /admin/lastthirtyays-reg-users.php via IP whitelisting or authentication requirements
  • Implement database user with minimal privileges (read-only if possible) for the affected application

🔍 How to Verify

Check if Vulnerable:

Test the ID parameter in /admin/lastthirtyays-reg-users.php with SQL injection payloads like ' OR '1'='1

Check Version:

Check PHPGurukul version in admin panel or configuration files

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and return appropriate error messages or no data

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts followed by SQL injection patterns
  • Admin panel access from unusual IP addresses

Network Indicators:

  • HTTP requests to /admin/lastthirtyays-reg-users.php with SQL keywords in parameters
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND uri="/admin/lastthirtyays-reg-users.php" AND (param="ID" AND value MATCHES "(?i)(union|select|insert|update|delete|drop|or|and)")

🔗 References

📤 Share & Export