VYPR
High severity7.3NVD Advisory· Published Jun 1, 2026

CVE-2026-10225

CVE-2026-10225

Description

SQL injection in login_check.php allows remote attackers to bypass authentication and gain admin privileges in the student management system.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

SQL injection in login_check.php allows remote attackers to bypass authentication and gain admin privileges in the student management system.

Vulnerability

The vulnerability resides in the login_check.php file of the raisulislamg4/student_management_system_by_php project, up to commit 310d950e09013d5133c6b9210aff9444382d16d1. The login script directly concatenates the user-supplied username POST parameter and the MD5 hash of the password into an SQL query without any parameterization, escaping, or input validation. The affected code constructs SELECT * FROM USERS WHERE USERNAME='$name' AND PASSWORD='$pass', making it susceptible to SQL injection [1]. The project uses a rolling release model, so no specific version numbers are available [2].

Exploitation

An attacker can exploit this vulnerability remotely by sending a crafted POST request to login_check.php. The attack requires no prior authentication. By injecting a classic SQL payload into the username field, such as admin' OR '1'='1' -- -, and providing any password, the query becomes SELECT * FROM USERS WHERE USERNAME='admin' OR '1'='1' -- -' AND PASSWORD='...', which bypasses the password check. The server responds with a 302 Found redirect to admin_home.php and sets a valid session cookie. The attacker can then use that session cookie to access the admin dashboard directly, confirming successful authentication bypass [1].

Impact

Successful exploitation results in authentication bypass, granting the attacker an administrative session without valid credentials. Once authenticated as an admin, the attacker gains full control over the application, including the ability to add, edit, or delete records, access sensitive data, and potentially chain with other vulnerabilities (e.g., stored XSS) to further compromise the system [1].

Mitigation

As of the publication date, no fix has been released. The project maintainer was informed via an issue report but has not responded [1]. The only mitigation is to apply input validation and use parameterized queries (prepared statements) in login_check.php. Since the project is unmaintained, users should consider migrating to an alternative solution or implementing a custom patch. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog [2].

AI Insight generated on Jun 1, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Missing input sanitisation and lack of parameterised queries in login_check.php allow SQL injection via the username field."

Attack vector

An attacker sends a POST request to `/login_check.php` with a crafted `username` parameter containing a classic SQL injection payload such as `admin' OR '1'='1' -- -`. The server constructs an SQL query by concatenating this input directly, causing the password check to be bypassed. The server responds with a `302 Found` redirect to `admin_home.php` and sets a valid session cookie, granting the attacker full administrative privileges [ref_id=1].

Affected code

The vulnerability resides in `login_check.php` (lines 6–30). The script directly concatenates the user-supplied `$_POST['username']` into an SQL query without parameterisation or escaping [ref_id=1].

What the fix does

No patch has been published by the project maintainer. The advisory recommends using parameterised queries (prepared statements) or properly escaping user input with `mysqli_real_escape_string()` to prevent SQL injection. Without such changes, the concatenation of unsanitized input into the SQL query remains exploitable [ref_id=1].

Preconditions

  • networkThe application must be running and the login endpoint must be reachable.
  • authNo authentication is required to access the login page.
  • inputThe attacker only needs to supply a malicious username via the login form.

Reproduction

Send a POST request to `/login_check.php` with `username=admin' OR '1'='1' -- -&password=aaa`. The server responds with a `302 Found` redirect to `admin_home.php` and a session cookie. Using that cookie, request `GET /admin_home.php` to access the admin dashboard [ref_id=1].

Generated on Jun 1, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.