/

CVE-2026-10225

Severity:

HIGH RISK

(7.3)

SQL Injection in PHP Student Management System Login Handler

CVE-2026-10225

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Authentication Bypass and Data Compromise

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in the login_check.php login component of the PHP-based student management system allows crafted Username input to alter database queries.

When exposed to remote attackers, this can enable unauthorized authentication bypass, data access, or modification through the login interface.

Affected context

The vulnerability occurs in the login functionality (login_check.php) of the student management system where user-supplied Username parameters are processed into database queries.

It is relevant in deployments where:

  • The application is publicly reachable over a network (e.g., internet or campus network)
  • The login form directly forwards Username input to backend SQL statements
  • Database accounts used by the application have broad privileges on user or application data

The issue manifests when the application does not reliably sanitize or parameterize the Username field before using it in SQL.

Exploit preconditions

  • Attack surface: Public or internal web interface exposing the login page
  • Required access: Network access to the web application; no prior authentication required
  • Trigger point: Submission of a crafted Username value to login_check.php via the Login component
  • Why exploitation is possible: The application concatenates raw Username input into SQL queries without robust parameterization or escaping, allowing injected SQL fragments to be executed by the database

Why this happens

This vulnerability stems from constructing SQL queries by directly interpolating untrusted user input (the Username parameter) into query strings.

Instead of using prepared statements with bound parameters, the code likely forms queries such as SELECT ... WHERE username = '$Username', which maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Additionally, improper output encoding or lack of rigorous input validation on database-related parameters aligns with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, as the database acts as the downstream consumer of the tainted input.

This insecure pattern allows attackers to inject control characters, logical operators, or additional statements that change the intended semantics of the SQL query.

Potential impact

  • Authentication bypass by manipulating login queries to always evaluate as true
  • Unauthorized access to student records, grades, or personal data stored in the database
  • Modification or deletion of application data, including user accounts and academic information
  • Creation of new privileged accounts within the application database
  • Disclosure of database structure or other sensitive metadata that can aid further attacks
  • Potential pivot into the underlying host or other systems if the database is misconfigured or highly privileged

General mitigation guidance

Durable mitigation focuses on eliminating direct string concatenation in SQL and tightening the trust boundary around login inputs.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions involving user input, especially authentication flows
  • Applying strict server-side validation of credentials, constraining Username to expected character sets (e.g., alphanumeric plus limited symbols)
  • Implementing a minimal-privilege database account for the application so that even if a query is manipulated, its impact is limited
  • Centralizing database access through a data access layer that enforces safe query construction patterns by default
  • Avoiding dynamic query construction based on raw request parameters for authentication and authorization logic

These measures should be applied consistently across all entry points, not just the login form.

How teams detect issues like this

Detection efforts can combine code-centric analysis and runtime observations:

  • Static analysis: Configure rules to flag SQL statements built via string concatenation or interpolation of request parameters in PHP files, especially in authentication-related scripts like login_check.php
  • Code review: During manual review, look for:
  • Direct use of $_GET, $_POST, or $_REQUEST variables in SQL strings
  • Absence of prepared statements (e.g., PDO with bound parameters, MySQLi prepared statements)
  • Custom escaping functions used instead of robust parameterization
  • Automated security testing: Leverage web application scanners or fuzzers that send SQL meta-characters through the Username field and monitor for errors or anomalous responses
  • Runtime monitoring: Enable database and application logging to detect unusual query patterns, authentication anomalies, or frequent login errors that could indicate probing for SQL injection

Integrating these checks into CI/CD pipelines and regular security assessments helps catch regressions in query handling.

Sources

SourceLink
github.comgithub.com/raisulislamg4/student_management_system_by_php/
github.comgithub.com/raisulislamg4/student_management_system_by_php/issues/2
vuldb.comvuldb.com/cve/CVE-2026-10225
vuldb.comvuldb.com/submit/822784
vuldb.comvuldb.com/vuln/367504
vuldb.comvuldb.com/vuln/367504/cti

Frequently asked

questions

Yes. An attacker with network access to the login page can attempt to exploit the issue by sending crafted Username values, without needing a valid account.

Only the ability to reach the web application over the network and interact with the login form is typically required; no prior authentication or local access is necessary.

The most robust fix is to refactor all affected database interactions to use parameterized queries or prepared statements, removing any direct concatenation of user-controlled input into SQL.

Establish secure coding standards that mandate parameterized queries, enforce them via code review and static analysis, restrict database privileges, and regularly test authentication endpoints with automated security tools to detect SQL injection risks early.

Find out what's already
exploitable in your codebase.