CVE-2023-29985

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to execute arbitrary SQL commands through the date_from parameter in the admin reports page of Student Study Center Desk Management System v1.0. Attackers can potentially access, modify, or delete database content. All installations of this specific version are affected.

💻 Affected Systems

Products:
  • Sourcecodester Student Study Center Desk Management System
Versions: v1.0
Operating Systems: Any OS running PHP and MySQL
Default Config Vulnerable: ⚠️ Yes
Notes: Requires PHP and MySQL database backend. Vulnerability in admin panel accessible with admin credentials.

📦 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 data access, privilege escalation, or database manipulation leading to system compromise.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to specific tables.

🌐 Internet-Facing: HIGH - Web application accessible from internet with SQL injection vulnerability.
🏢 Internal Only: HIGH - Even internal systems vulnerable to insider threats or lateral movement.

🎯 Exploit Status

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

Exploit requires admin authentication but SQL injection is straightforward once authenticated. Public proof-of-concept available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

No official patch available. Manual code remediation required: 1. Locate admin/reports/index.php 2. Implement parameterized queries or input validation for date_from parameter 3. Sanitize all user inputs

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to restrict date_from parameter to valid date formats only

Add to admin/reports/index.php: if(!preg_match('/^\d{4}-\d{2}-\d{2}$/', $_GET['date_from'])) { die('Invalid date format'); }

Web Application Firewall

all

Deploy WAF with SQL injection protection rules

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement strict network segmentation and monitor all database queries from the application

🔍 How to Verify

Check if Vulnerable:

Test date_from parameter with SQL injection payloads like: ' OR '1'='1

Check Version:

Check version in application interface or readme files

Verify Fix Applied:

Test with same payloads and verify they are rejected or properly sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin panel
  • Suspicious date format inputs in web logs

Network Indicators:

  • SQL injection patterns in HTTP requests to admin/reports/index.php
  • Unusual database connection patterns

SIEM Query:

web.url:*admin/reports/index.php* AND (web.param.date_from:*OR* OR web.param.date_from:*UNION* OR web.param.date_from:*SELECT*)

🔗 References

📤 Share & Export