Severity:

HIGH RISK

(7.3)

SQL Injection in Online Enrollment System 1.0

CVE-2026-5334

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized Data Access and Modification

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

The Online Enrollment System 1.0 contains a SQL injection vulnerability in the Parameter Handler of /enrollment/index.php?view=edit&id=3, where the deptid parameter is not safely handled.

A remote attacker can manipulate this parameter to inject arbitrary SQL queries, potentially accessing or modifying enrollment-related data in the backend database.

Affected context

The vulnerability occurs in the enrollment editing flow of the Online Enrollment System 1.0, specifically when handling requests to /enrollment/index.php with view=edit.

The application appears to construct database queries using HTTP request parameters such as deptid without robust server-side validation or parameterization.

Systems exposed to the internet or untrusted networks, where the enrollment interface is directly reachable over HTTP/HTTPS, are particularly at risk.

Exploit preconditions

  • Attack surface: Public or network-accessible web interface at /enrollment/index.php?view=edit&id=3
  • Required access: No prior authentication is necessarily implied; the vulnerable endpoint just needs to be reachable by the attacker
  • Trigger point: Issuing crafted HTTP requests where the deptid query parameter contains SQL metacharacters or injected clauses
  • Why exploitation is possible: The backend logic interpolates deptid directly into SQL statements (e.g., string concatenation) instead of using prepared statements or proper escaping, matching CWE-89 and CWE-74 patterns

Why this happens

The core issue is the construction of SQL queries using untrusted input from the deptid request parameter.

Rather than binding deptid as a parameter through prepared statements, the application likely concatenates it into the SQL string, allowing attacker-supplied fragments to alter query structure.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and is facilitated by CWE-74: Improper Neutralization of Special Elements in Output, because SQL metacharacters are not adequately sanitized before being passed to the database.

The pattern is a classic injection bug: mixing data and control in the same string without rigorous separation.

Potential impact

  • An attacker could retrieve sensitive enrollment records and associated personal information.
  • Attackers may be able to insert, update, or delete student or departmental data in the database.
  • The vulnerability could be used to bypass application-level authorization checks by manipulating backend queries.
  • In some environments, SQL injection could be leveraged to escalate to remote code execution via DBMS-specific features.
  • Database integrity and availability may be impacted, including possible denial-of-service through expensive or destructive queries.

General mitigation guidance

Mitigation focuses on eliminating direct use of untrusted input in SQL and enforcing strict separation between query structure and data:

  • Use parameterized queries or prepared statements for all database operations that involve user-provided values, including deptid.
  • Apply strict server-side validation and type enforcement for parameters such as deptid (e.g., allow only numeric IDs and reject anything else).
  • Centralize input handling in a parameter handling layer that encodes or rejects special SQL metacharacters rather than passing them through.
  • Implement least-privilege database accounts so that even if a query is abused, the account cannot perform dangerous operations beyond what is necessary.
  • Consider adding a query-building abstraction layer that disallows ad-hoc string concatenation for SQL construction.

How teams detect issues like this

Detection is typically achieved by combining code-level analysis with runtime checks:

  • Use static analysis or SAST rules to flag dynamic SQL construction patterns (string concatenation involving $_GET, $_POST, or generic request parameters in PHP).
  • During code review, look for database calls where query strings directly include variables like $deptid without binding, and check any general "Parameter Handler" component for centralization of unsafe patterns.
  • Employ web application firewalls (WAFs) or RASP solutions configured to detect and block common SQL injection payloads on parameters such as deptid.
  • Integrate security testing (e.g., DAST scanners) into CI/CD to probe endpoints like /enrollment/index.php?view=edit for anomalous SQL responses or error patterns.

Sources

SourceLink
github.comgithub.com/yuji0903/silver-guide/issues/15
itsourcecode.comitsourcecode.com/
vuldb.comvuldb.com/submit/781119
vuldb.comvuldb.com/vuln/354668
vuldb.comvuldb.com/vuln/354668/cti

Frequently asked

questions

Yes. As described, the vulnerable endpoint can be triggered over the network via HTTP requests, so any attacker who can reach the Online Enrollment System interface may attempt exploitation.

The description does not require authentication as a precondition. Unless the vulnerable edit view is access-controlled, exploitation can be performed by unauthenticated users with network access to the application.

The most robust fix is to move all SQL construction to parameterized queries or prepared statements and to treat deptid and similar parameters strictly as typed data, not as query fragments. Eliminating string concatenation between SQL and user input is key.

Adopt a secure-by-default data access layer that only supports bound parameters, enforce strong input validation on all request parameters, and include automated security checks (SAST/DAST) and security-focused code reviews in the development lifecycle to catch injection patterns early.

Find out what's already
exploitable in your codebase.