CVE-2024-3769

7.3 HIGH

📋 TL;DR

This critical vulnerability in PHPGurukul Student Record System 3.20 allows SQL injection through the login.php page, potentially enabling authentication bypass and unauthorized database access. Attackers can exploit this remotely without authentication, affecting all systems running the vulnerable version.

💻 Affected Systems

Products:
  • PHPGurukul Student Record System
Versions: Version 3.20
Operating Systems: Any OS running PHP with database backend
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the default installation. The vulnerability is in the core authentication mechanism.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise including data theft, data manipulation, privilege escalation, and potential remote code execution via SQL injection.

🟠

Likely Case

Authentication bypass leading to unauthorized access to student records, grade manipulation, and sensitive data exposure.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and web application firewall rules in place.

🌐 Internet-Facing: HIGH - The vulnerability is in the login page which is typically internet-facing, allowing remote exploitation without authentication.
🏢 Internal Only: MEDIUM - While still vulnerable, internal-only deployments have reduced attack surface compared to internet-facing instances.

🎯 Exploit Status

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

Public exploit code is available on GitHub. The vulnerability requires minimal technical skill to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add input validation and parameterized queries to login.php to prevent SQL injection

Modify login.php to use prepared statements: $stmt = $conn->prepare('SELECT * FROM users WHERE username = ? AND password = ?'); $stmt->bind_param('ss', $username, $password);

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns in login requests

Add WAF rule: SecRule ARGS:id "@detectSQLi" "id:1001,phase:2,deny,status:403,msg:'SQL Injection Attempt'"
SecRule ARGS:password "@detectSQLi" "id:1002,phase:2,deny,status:403,msg:'SQL Injection Attempt'"

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement network segmentation and strict access controls to limit potential damage

🔍 How to Verify

Check if Vulnerable:

Test login.php with SQL injection payloads like: ' OR '1'='1 in username/password fields

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Attempt SQL injection payloads after fixes; successful login should only occur with valid credentials

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts with SQL patterns
  • Successful logins from unexpected IP addresses

Network Indicators:

  • HTTP POST requests to login.php containing SQL keywords (UNION, SELECT, OR, --)
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND uri="/login.php" AND (request_body LIKE "%UNION%" OR request_body LIKE "%SELECT%" OR request_body LIKE "%OR%1%3D1%")

🔗 References

📤 Share & Export