CVE-2023-39850

9.8 CRITICAL

📋 TL;DR

Schoolmate v1.3 contains SQL injection vulnerabilities in the DeleteFunctions.php file via the $courseid and $teacherid parameters. Attackers can execute arbitrary SQL commands, potentially compromising the database. All users running Schoolmate v1.3 are affected.

💻 Affected Systems

Products:
  • Schoolmate
Versions: v1.3
Operating Systems: Any
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of Schoolmate v1.3 regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise allowing data theft, modification, or deletion, and potential remote code execution if database permissions allow.

🟠

Likely Case

Unauthorized data access, manipulation of student/teacher records, and potential privilege escalation.

🟢

If Mitigated

Limited impact with proper input validation and database permission restrictions in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authentication but is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Modify DeleteFunctions.php to validate and sanitize $courseid and $teacherid parameters before use in SQL queries.

Edit DeleteFunctions.php to implement parameterized queries or proper input validation

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block malicious requests.

Configure WAF rules to detect and block SQL injection patterns

🧯 If You Can't Patch

  • Restrict database user permissions to minimum required
  • Implement network segmentation to isolate the Schoolmate application

🔍 How to Verify

Check if Vulnerable:

Check if running Schoolmate v1.3 by examining version files or application metadata.

Check Version:

Check version.txt or similar files in the Schoolmate installation directory.

Verify Fix Applied:

Test the DeleteFunctions.php endpoints with SQL injection payloads to ensure they are properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in application logs
  • Multiple failed delete attempts with malformed parameters

Network Indicators:

  • HTTP requests to DeleteFunctions.php with SQL injection patterns in parameters

SIEM Query:

source="web_logs" AND uri="*DeleteFunctions.php*" AND (param="*courseid*" OR param="*teacherid*") AND (payload="*' OR*" OR payload="*;--*" OR payload="*UNION*" OR payload="*SELECT*" OR payload="*INSERT*" OR payload="*UPDATE*" OR payload="*DELETE*")

🔗 References

📤 Share & Export