/

CVE-2026-36235

Severity:

CRITICAL RISK

(9.8)

SQL Injection in Online Student Enrollment System

CVE-2026-36235

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Compromise and Potential Full Application Takeover

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

A critical SQL injection flaw in the scheduleSubList.php endpoint of the Online Student Enrollment System v1.0 allows untrusted user input from the subjcode parameter to be directly concatenated into SQL queries.

When an attacker can control this parameter, they may be able to manipulate the underlying database queries, leading to data exfiltration, modification, or full compromise of the application's data layer.

Affected context

This vulnerability affects deployments of the Online Student Enrollment System v1.0 where the scheduleSubList.php script is exposed to users (e.g., students, staff, or public users) and passes the subjcode request parameter directly into SQL statements.

The risk is heightened in environments where the application uses a privileged database account, lacks query-level access controls, or is reachable from untrusted networks such as the public internet.

Exploit preconditions

  • Attack surface: HTTP requests to scheduleSubList.php that accept a subjcode parameter via GET or POST.
  • Required access: Ability to send web requests to the affected endpoint; this may be anonymous or authenticated depending on deployment.
  • Trigger point: The application constructs an SQL query by interpolating the subjcode parameter into the query string and submits it to the database.
  • Why exploitation is possible: The subjcode parameter is neither validated nor parameterized, allowing attacker-controlled input to alter the structure of the SQL query rather than being treated as a data value.

Why this happens

The root cause aligns with CWE-89: SQL Injection, where dynamic SQL statements are built by concatenating untrusted input directly into query strings.

In this case, the scheduleSubList.php script interpolates the subjcode parameter into SQL without using prepared statements, bound parameters, or robust input validation.

This insecure pattern allows user input to break out of the intended data context and inject additional SQL tokens, conditions, or statements that the database will execute.

Potential impact

  • Database query manipulation that can modify or bypass application logic.
  • Unauthorized reading of student records, enrollment data, and other sensitive information.
  • Unauthorized modification or deletion of enrollment schedules and related records.
  • Escalation of application privileges by tampering with user or role data stored in the database.
  • In some environments, potential execution of database-level commands that could impact the host or adjacent systems, depending on DBMS configuration.

General mitigation guidance

Effective mitigation centers on treating all external input as untrusted and strictly separating data from code in database operations.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database access, ensuring user-controlled values are bound as parameters rather than concatenated into SQL strings.
  • Applying strict input validation and normalization for identifiers like subjcode, such as whitelisting allowed formats (e.g., specific patterns of letters and digits) before using them in queries.
  • Implementing least-privilege database accounts so the application can only perform the minimal set of operations required (e.g., read-only where feasible).
  • Centralizing database access logic in a data access layer that enforces safe query construction patterns by default.
  • Employing application-level error handling to avoid leaking database error details that aid in crafting injections.

How teams detect issues like this

Organizations can detect and monitor for SQL injection risks through a combination of code-centric and operational approaches:

  • Static analysis: Configure SAST rules to flag direct string concatenation into SQL statements and highlight uses of raw query execution APIs that accept interpolated strings.
  • Code review: During manual review, look for patterns where request parameters (like $_GET['subjcode'] or $_POST['subjcode']) are used directly in queries without parameter binding or validation.
  • Runtime protections: Use web application firewalls (WAFs) or similar proxies configured with SQL injection detection signatures to observe and, where appropriate, block suspicious payloads.
  • Security testing: Incorporate automated DAST tools and targeted penetration tests against endpoints such as scheduleSubList.php to identify injectable parameters and verify mitigation effectiveness.

Sources

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

Frequently asked

questions

Yes. If scheduleSubList.php is exposed over a network (for example, as part of a public or campus-facing web application), an attacker can exploit the injection remotely by sending crafted requests containing malicious subjcode values.

Not necessarily. Exploitability depends on how the application restricts access to scheduleSubList.php. If the endpoint is publicly accessible or available to low-privileged users, then those users can attempt SQL injection even without elevated roles.

The most robust fix is to refactor database access to use parameterized queries or prepared statements, ensuring that untrusted input is always bound as data parameters. This should be accompanied by strict input validation for identifiers like subject codes.

Adopt a secure coding standard that mandates parameterized queries for all database interactions, enforce this via code review and static analysis, and provide developers with vetted data access utilities that make the safe pattern the easiest option. Regular security testing and training on injection risks further reduces the likelihood of reintroducing similar flaws.

Find out what's already
exploitable in your codebase.