Severity:

HIGH RISK

(7.3)

SQL Injection in Online Enrollment System login.php

CVE-2026-4235

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Authentication Bypass and Data Compromise via SQL Injection

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

Online Enrollment System 1.0 contains a SQL injection vulnerability in /sms/login.php where the user_email parameter is incorporated into database queries without proper sanitization.

A remote attacker can send crafted login requests to manipulate the underlying SQL query, which may lead to authentication bypass, information disclosure, or modification of enrollment data.

Affected context

The vulnerability occurs in the login functionality of the Online Enrollment System 1.0, specifically within the /sms/login.php endpoint.

It is present when the application constructs SQL statements using the user_email request parameter directly, without parameterization or robust input validation.

Any deployment where /sms/login.php is exposed to users over a network and backed by a relational database is potentially affected.

Exploit preconditions

  • Attack surface: Network-exposed web interface at /sms/login.php
  • Required access: Ability to send HTTP requests to the login endpoint (no prior authentication assumed)
  • Trigger point: Submission of crafted values in the user_email parameter during login
  • Why exploitation is possible: The server-side code appears to dynamically build SQL queries using raw user-controlled input, allowing injection of additional SQL syntax into the query execution path.

Why this happens

This issue stems from constructing SQL queries by concatenating or interpolating the user_email parameter directly into the query string.

Such patterns violate the principle of separating code from data and align with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The mention of CWE-74 (Improper Neutralization of Special Elements in Output) reflects broader inadequate neutralization of special characters, but the primary bug class is unparameterized SQL, which allows attacker-controlled input to alter query structure.

Potential impact

  • An attacker may bypass login checks and impersonate other users or administrative accounts.
  • An attacker could retrieve sensitive information from the enrollment database, such as student records, contact details, or internal system data.
  • An attacker can modify or delete enrollment records, impacting data integrity and system reliability.
  • Under certain configurations, an attacker might chain this issue with other weaknesses for broader system compromise.

General mitigation guidance

Effective mitigation focuses on treating all request parameters, including user_email, as untrusted input and ensuring the database layer enforces strict separation between query logic and data.

Common defensive patterns include:

  • Using prepared statements with bound parameters or ORM query builders that avoid raw string concatenation.
  • Applying centralized, whitelist-based validation for email-like inputs and rejecting values that do not meet expected formats.
  • Implementing least-privilege database accounts so that even if a query is abused, the account cannot perform unsafe operations (such as dropping tables or accessing unrelated schemas).
  • Encapsulating database access behind a well-reviewed data access layer, reducing direct ad-hoc query construction in presentation code like login.php.

How teams detect issues like this

Detection typically combines code-centric review with runtime signals:

  • Static analysis rules looking for dynamic SQL construction involving $_GET, $_POST, or other request variables, especially for user_email in login-related scripts.
  • Manual code review focusing on /sms/login.php and similar entry points, flagging any concatenation of user-controlled variables into SQL strings.
  • Web application firewall (WAF) or reverse proxy rules that log and optionally block suspicious SQL meta-characters or patterns in login parameters.
  • Application-level logging and anomaly detection around failed logins, unusual query patterns, and unexpected result sets that may indicate probing for SQL injection.

Sources

SourceLink
github.comgithub.com/yuji0903/silver-guide/issues/11
itsourcecode.comitsourcecode.com/
vuldb.comvuldb.com/?ctiid.351158
vuldb.comvuldb.com/?id.351158
vuldb.comvuldb.com/?submit.771240

Frequently asked

questions

Yes. Because the issue is in the /sms/login.php endpoint, any remote user who can reach the login interface over the network can attempt to exploit the SQL injection.

Typically no. The vulnerable parameter is part of the login flow, which is usually accessible before authentication, so an attacker can exploit it without existing credentials.

Replace any dynamically constructed SQL in the login logic with parameterized queries or ORM-based access, combined with strict validation of email input and least-privilege database permissions.

Establish a coding standard that forbids raw SQL concatenation with user input, enforce use of prepared statements across the codebase, integrate static analysis and security checks into CI, and perform regular security reviews on authentication and input-handling components.

Find out what's already
exploitable in your codebase.