/

CVE-2026-36232

Severity:

CRITICAL RISK

(9.8)

SQL Injection in Online Student Enrollment System

CVE-2026-36232

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Complete Database Compromise

Severity:

CRITICAL RISK

(9.8)

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

The Online Student Enrollment System v1.0 contains a SQL injection flaw in instructorClasses.php, where the classId parameter from user-controlled GET input is directly concatenated into a SQL query.

An attacker who can send crafted HTTP requests to this endpoint may be able to manipulate database queries, leading to data exposure, tampering, or complete compromise of the application's underlying database.

Affected context

This vulnerability occurs in deployments of the Online Student Enrollment System v1.0 that expose the instructorClasses.php script over HTTP/S and accept a classId parameter via the query string.

The issue is present where application code builds SQL statements by directly concatenating $_GET['classId'] into the query without applying parameterization, input validation, or escaping.

It is relevant in environments where the web application account has permission to read or modify sensitive enrollment, student, or instructor records in the backing database.

Exploit preconditions

  • Attack surface: Web interface, specifically requests hitting instructorClasses.php.
  • Required access: Network access to the web application; no authenticated session may be required if the vulnerable script is reachable anonymously.
  • Trigger point: Supplying a crafted classId value via the URL query string (e.g., ?classId=...) so that it is processed by $_GET['classId'] and interpolated into a SQL query.
  • Why exploitation is possible: The application constructs SQL statements by string concatenation using untrusted input, without prepared statements, proper escaping, or type enforcement, allowing attackers to alter the intended query structure.

Why this happens

The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

In the affected code, the classId parameter is taken directly from $_GET['classId'] and concatenated into the SQL command text.

This pattern treats user-controlled data as part of the SQL language rather than as a value, so injected characters such as quotes, operators, and comment markers can terminate existing clauses or introduce new ones.

The absence of prepared statements, input binding, and robust validation allows the database to interpret attacker-supplied content as executable SQL logic.

Potential impact

  • Attackers may extract sensitive student, instructor, and enrollment data from the database.
  • An attacker could modify or delete enrollment records, grades, or class information.
  • The database account used by the application might be leveraged to create new accounts or escalate privileges within the application.
  • In some environments, the attacker could execute database-specific commands that impact availability or interact with the underlying operating system, depending on configuration.
  • Compromise of data integrity, leading to falsified academic records or disrupted enrollment processes.

General mitigation guidance

Effective mitigation focuses on removing direct concatenation of untrusted data into SQL and tightening data handling boundaries:

  • Use parameterized queries or prepared statements with bound parameters for all database interactions, especially where classId and similar inputs are involved.
  • Enforce strict server-side validation and type checking for identifiers, ensuring values such as classId conform to expected formats (e.g., integers or known IDs) before they are used in queries.
  • Apply least-privilege principles to the database account used by the web application so it only has the minimum necessary permissions (e.g., read-only where feasible).
  • Centralize data access in a data access layer or ORM that defaults to safe query construction patterns.
  • Implement a secure coding standard that prohibits ad-hoc string-based SQL assembly with user input.

How teams detect issues like this

Detection efforts can combine automated analysis with focused review of database access code:

  • Use static analysis tools configured with rules for identifying SQL injection patterns, such as direct concatenation of $_GET, $_POST, or other superglobals into SQL strings.
  • Perform manual code review of instructorClasses.php and related modules, looking for raw SQL queries that incorporate user input without parameterization.
  • Introduce pre-commit or CI policies that flag direct usage of user-controlled variables inside SQL strings and require the use of prepared statements or query builders.
  • Conduct application-level security testing, including parameter fuzzing and error-based checks on classId, to detect unexpected database errors or behavior indicative of injection.

Sources

SourceLink
github.comgithub.com/Amorsec/CVE-PHP/blob/main/itsourcecode-Online_Student_Enrollment_System_in_instructorClasses.php_sql_injection.pdf

Frequently asked

questions

Yes. Anyone who can reach the instructorClasses.php endpoint over the network and control the classId parameter can attempt to exploit the SQL injection, subject to any authentication or routing controls in place.

It depends on how the application is configured. If instructorClasses.php is accessible without login, no authentication is required. If it is behind a login, the attacker would need at least the level of access required to reach that page.

Replace all dynamic, string-concatenated SQL statements involving classId and other parameters with parameterized queries or prepared statements, combined with strict server-side validation of input types and ranges.

Adopt a development standard that mandates parameterized queries for all database access, centralize data access through vetted libraries or ORMs, enforce input validation at trust boundaries, and integrate static analysis and security checks into the CI/CD pipeline to catch unsafe patterns early.

Find out what's already
exploitable in your codebase.