CVE-2022-27041

7.5 HIGH

📋 TL;DR

CVE-2022-27041 is an SQL injection vulnerability in OpenSIS Classic's Student.php module that allows attackers to manipulate the student_id parameter to execute arbitrary SQL queries. This affects all users of OpenSIS Classic 8.0 who have the eligibility module enabled, potentially exposing sensitive student and system data.

💻 Affected Systems

Products:
  • OpenSIS Classic
Versions: 8.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the /modules/eligibility/ module to be enabled and accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including extraction of all student records, administrative credentials, and potential remote code execution through database functions.

🟠

Likely Case

Unauthorized access to student records, grades, personal information, and potential privilege escalation within the application.

🟢

If Mitigated

Limited information disclosure if proper input validation and parameterized queries are implemented.

🌐 Internet-Facing: HIGH - The vulnerability is in a web application module that is typically internet-facing in educational deployments.
🏢 Internal Only: MEDIUM - Even internally, the vulnerability could be exploited by malicious insiders or through compromised internal systems.

🎯 Exploit Status

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

Exploitation requires access to the eligibility module but does not require authentication. The vulnerability is straightforward to exploit using standard SQL injection techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check GitHub repository for latest patched version

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

Restart Required: No

Instructions:

1. Update to the latest version of OpenSIS Classic from the official repository. 2. Apply the patch for Student.php that implements proper input validation and parameterized queries. 3. Verify the fix by testing the student_id parameter.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to only accept numeric values for student_id parameter

Add validation in Student.php: if(!is_numeric($_GET['student_id'])) { die('Invalid input'); }

Web Application Firewall Rule

all

Block SQL injection patterns targeting the eligibility module

WAF rule: deny requests to /modules/eligibility/* containing SQL keywords in parameters

🧯 If You Can't Patch

  • Disable the /modules/eligibility/ module entirely if not required
  • Implement network segmentation to restrict access to OpenSIS application to authorized users only

🔍 How to Verify

Check if Vulnerable:

Test the student_id parameter with SQL injection payloads like: /modules/eligibility/Student.php?student_id=1' OR '1'='1

Check Version:

Check OpenSIS version in admin panel or review source code version markers

Verify Fix Applied:

Attempt SQL injection after patch and verify error messages or unexpected data are not returned

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple rapid requests to Student.php with varying student_id parameters
  • Requests containing SQL keywords (UNION, SELECT, etc.) in student_id parameter

Network Indicators:

  • HTTP requests to /modules/eligibility/Student.php with non-numeric student_id values
  • Abnormal response sizes from eligibility module queries

SIEM Query:

source="web_logs" AND uri_path="/modules/eligibility/Student.php" AND (query_string="*UNION*" OR query_string="*SELECT*" OR query_string="*OR*1*" OR query_string="*'*'*'*")

🔗 References

📤 Share & Export