CVE Professor
/
All CVEs
CVE-2026-137046

CVE-2026-137046 — mahmoudai1 school-management-system — CWE-74 · CWE-89

HIGH CVSS 7.3 NVD

A vulnerability was detected in mahmoudai1 school-management-system up to ecec9faaf2fb1a3c5cd096e063f8ef326d09cdfd. The impacted element is the function userModel::checkUserInDB of the file loginServer.php of the component Login Handler. Performing a manipulation of the argument ID results in sql injection. The attack is possible to be carried out remotely. The exploit is now public and may be used. The project was informed of the problem early through an issue report but has not responded yet.

A vulnerability was detected in mahmoudai1 school-management-system up to ecec9faaf2fb1a3c5cd096e063f8ef326d09cdfd. The impacted element is the function userModel::checkUserInDB of the file loginServer.php of the component Login Handler. Performing a manipulation of the argument ID results in sql injection. The attack is possible to be carried out remotely. The exploit is now public and may be used. The project was informed of the problem early through an issue report but has not responded yet.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity Low I:L
Availability Low A:L
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a classic SQL Injection (SQLi) flaw classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) and CWE-74 (Improper Neutralization of Special Elements used in an OS Command).

The specific technical failure occurs in the userModel::checkUserInDB function within the loginServer.php file of the mahmoudai1/school-management-system project. The function accepts an argument named ID (likely a user identifier or session token) and fails to sanitize or parameterize this input before incorporating it into a SQL query.

Because the CVSS vector indicates PR:N (No Privileges Required) and AV:N (Network), the vulnerable endpoint is accessible to unauthenticated remote users. The lack of input validation allows an attacker to break out of the intended string context and inject arbitrary SQL commands. This is a direct result of concatenating user-supplied data into SQL statements without using prepared statements or strict type casting.

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies the target as running mahmoudai1/school-management-system. This can be done by:
  • * Checking for default directory structures (e.g., /loginServer.php, /assets/, /vendor/). * Analyzing HTTP response headers or HTML source code for specific meta tags or script paths unique to this project. * Using tools like whatweb or nmap with NSE scripts to detect the specific PHP application.
  • Version Verification: Since the CVE specifies "up to ecec9faaf2fb1a3c5cd096e063f8ef326d09cdfd," the attacker may attempt to identify the Git commit hash if exposed in source maps, error messages, or version files.
  • 2. Exploitation

    The attacker targets the loginServer.php endpoint, specifically the ID parameter. Since the exact URI structure is not explicitly detailed in the CVE description beyond the filename, the following is an illustrative example of how the injection would be constructed based on the described component.

    Hypothesized Endpoint: POST /loginServer.php or GET /loginServer.php?ID=...

    Payload Construction:
    The attacker injects a boolean-based blind SQL injection or error-based payload to test for injection.

    Example PoC (Illustrative):

    # Attempting to trigger a SQL error or boolean response
    curl -X POST "http://target-school-system/loginServer.php" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "ID=1' OR '1'='1"

    If the application is vulnerable, the SQL query might look like this (hypothetical backend code):

    // Vulnerable Code Pattern
    $query = "SELECT * FROM users WHERE id = '$ID'";

    With the payload 1' OR '1'='1, the query becomes:

    SELECT * FROM users WHERE id = '1' OR '1'='1'

    This condition is always true, potentially returning the first user in the database or causing an unexpected behavior that confirms the injection.

    Advanced Exploitation (Data Exfiltration):
    If the application is running on MySQL, the attacker can use UNION SELECT to extract data from other tables (e.g., students, teachers, passwords).

    # Example of UNION-based injection (Illustrative)
    curl -X POST "http://target-school-system/loginServer.php" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "ID=-1' UNION SELECT username, password FROM users-- -"

    3. Post-Exploitation

  • Credential Theft: Extracting hashed passwords from the users table. If hashes are weak (MD5/SHA1), they can be cracked offline.
  • Data Exfiltration: Dumping sensitive student records, personal information, and financial data.
  • Privilege Escalation: If the database user has FILE privileges, the attacker may attempt to write a webshell to the web root using INTO OUTFILE or LOAD_FILE (if MySQL is configured to allow it).
  • RCE: If the database user has SUPER privileges or if the application allows dynamic SQL execution, the attacker might achieve Remote Code Execution (RCE) by leveraging MySQL UDFs (User-Defined Functions) or other database-specific features.
  • 🌍 Real World Impact

  • Confidentiality (C:L): Low to Moderate. The attacker can read sensitive data such as student PII, teacher credentials, and administrative records. The "Low" rating in CVSS may reflect that while data is exposed, it is not necessarily critical national security data, but for a school, this is a severe breach of privacy.
  • Integrity (I:L): Low to Moderate. The attacker can modify or delete records (e.g., altering grades, deleting student profiles) if the SQL injection allows UPDATE or DELETE statements.
  • Availability (A:L): Low. The attacker could potentially crash the database or delete critical data, causing service disruption, but this is less likely to be the primary impact compared to data theft.
  • Practical Consequences:

  • Data Breach: Exposure of sensitive student and staff personal information, leading to legal liabilities (GDPR, FERPA, etc.) and reputational damage.

  • Account Takeover: If admin credentials are compromised, the attacker can gain full control over the school management system.

  • Financial Loss: Potential fines for data breaches and costs associated with incident response and remediation.
  • 🛡️ Remediation & Mitigation

    1. Upgrade/Patch

  • Affected Versions: mahmoudai1/school-management-system up to commit ecec9faaf2fb1a3c5cd096e063f8ef326d09cdfd.
  • Recommendation: Since the project maintainer has not responded, do not rely on an official patch. Instead:
  • * Fork the repository and apply the fix manually. * Fix: Modify userModel::checkUserInDB in loginServer.php to use Prepared Statements with parameterized queries. * Example Fix (PHP PDO):
    // Secure Code Pattern
            $stmt = $pdo->prepare("SELECT * FROM users WHERE id = :id");
            $stmt->execute(['id' => $ID]);
            $user = $stmt->fetch();

    2. Workarounds

  • Input Validation: Implement strict server-side validation for the ID parameter. Ensure it matches an expected format (e.g., integer only) before processing.
  • if (!ctype_digit($ID)) {
            die("Invalid ID format");
        }
  • WAF Rules: Deploy a Web Application Firewall (WAF) with rules to detect and block SQL injection patterns.
  • * ModSecurity Rule Example:
    SecRule ARGS:id "@rx (?i)(union|select|insert|update|delete|drop|alter|create|truncate|exec|xp_cmdshell)" \
                "id:100001,phase:2,deny,status:403,msg:'SQL Injection Detected'"
  • Access Restriction: If possible, restrict access to loginServer.php to specific IP ranges or require additional authentication layers (e.g., CAPTCHA) before the request reaches the vulnerable function.
  • 3. Detection

  • Web Server Logs: Monitor access.log and error.log for suspicious patterns in the ID parameter.
  • * IoC Pattern:
    GET /loginServer.php?ID=1' OR '1'='1
            POST /loginServer.php
            ID=-1' UNION SELECT username, password FROM users-- -
  • Database Logs: Enable general query logging in MySQL/PostgreSQL to detect unusual queries, such as UNION SELECT statements or queries accessing tables not normally accessed by the login function.
  • File Integrity Monitoring: Monitor the web root for new or modified files (e.g., .php files) that could indicate a webshell upload via SQL injection.
  • ⚠️ Urgency

  • CVSS Score: 7.3 (HIGH)
  • CISA KEV: No
  • Exploit Availability: Public
  • Priority: HIGH
Reasoning: Although not listed in CISA KEV, the exploit is public, and the vulnerability is unauthenticated and remotely exploitable. The impact on a school management system (sensitive PII) is severe. The lack of a maintainer response increases the risk, as there is no official patch. Organizations should treat this as an immediate priority for remediation, especially if the system is internet-facing. If an immediate patch is not possible, implement WAF rules and input validation as a temporary mitigation.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-137046
Technical reference / advisory repository for CVE-2026-137046
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-74 CWE-89
Related CVEs
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.8
CVE-2026-145040
WWBN AVideo before 29.9.0 contains a blind sql injection vulnerability that allows unauthenticated attackers t
9.3
CVE-2026-136358
Joomla Extension - joomboost.com - Unauthenticated SQL injection in JoomMedia extension 1.0.0-6.1.5 - The list
9.3
CVE-2026-136369
Joomla Extension - joomboost.com - Unauthenticated SQL injection in JoomInvoice extension 1.0.0-6.5.2 - Inputs
9.3
CVE-2026-136376
Joomla Extension - joomboost.com - SQL injection in search time filters in JoomRecipe extension 1.0.0-6.9.8 -
9.3
CVE-2026-77432
activity_notification provides integrated user activity notifications for Ruby on Rails. Prior to version 2.7.
9.2
CVE-2026-145153
LangChain4j before 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29, and 1.23.0-beta33 contains an injection vulner