CVE-2021-39377

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in openSIS 8.0 allows attackers to execute arbitrary SQL commands through the username parameter in index.php when using MySQL/MariaDB. This can lead to unauthorized data access, modification, or deletion. All openSIS 8.0 installations using MySQL/MariaDB are affected.

💻 Affected Systems

Products:
  • openSIS Classic
Versions: 8.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations using MySQL or MariaDB as the database backend.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, privilege escalation to admin, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized access to sensitive student and staff data, grade manipulation, and administrative privilege escalation.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - The vulnerability is in the login page (index.php) which is typically internet-facing.
🏢 Internal Only: MEDIUM - Internal systems could still be targeted by malicious insiders or compromised internal devices.

🎯 Exploit Status

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

Exploitation requires no authentication and simple SQL injection payloads work against the username parameter.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 8.1 or later

Vendor Advisory: https://github.com/OS4ED/openSIS-Classic

Restart Required: No

Instructions:

1. Backup your database and application files. 2. Download openSIS 8.1 or later from GitHub. 3. Replace vulnerable index.php and related files. 4. Test the application functionality.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

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

Input Validation Filter

linux

Add server-side input validation to reject SQL special characters in username parameter.

Example PHP: if (preg_match('/[\'\"\;\-\-]/', $_POST['username'])) { die('Invalid input'); }

🧯 If You Can't Patch

  • Isolate the openSIS server behind a firewall with strict access controls.
  • Implement database user privilege separation with minimal required permissions.

🔍 How to Verify

Check if Vulnerable:

Test with SQL injection payload in username field: ' OR '1'='1

Check Version:

Check openSIS version in admin panel or review index.php file headers.

Verify Fix Applied:

Attempt SQL injection payloads and verify they are rejected or properly escaped.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed login attempts with SQL keywords in username field
  • Unusual database query patterns from web server IP

Network Indicators:

  • HTTP POST requests to index.php containing SQL injection patterns

SIEM Query:

source="web_logs" AND uri="/index.php" AND (username="*' OR*" OR username="*--*" OR username="*;*")

🔗 References

📤 Share & Export