Severity:

HIGH RISK

(7.3)

SQL Injection in College Management System Admin Salary

CVE-2026-3152

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

A SQL injection vulnerability in the itsourcecode College Management System 1.0 allows attackers to manipulate database queries through the teacher_id parameter in /admin/teacher-salary.php.

When this parameter is not safely handled, a remote attacker can craft requests that alter or disclose backend data, potentially impacting teacher salary records and related administrative information.

Affected context

The vulnerability appears in the administrative salary processing feature of the College Management System, specifically in /admin/teacher-salary.php.

It manifests when user-controlled input from the teacher_id argument is incorporated into SQL statements without proper neutralization or use of parameterized queries.

This risk is present in deployments where the admin interface is network-accessible and where access controls or input validation do not fully constrain untrusted or tampered requests.

Exploit preconditions

  • Attack surface: HTTP(S) requests to /admin/teacher-salary.php
  • Required access: Ability to send crafted requests to the admin endpoint (via authenticated admin session, stolen credentials, weak access control, or exposed admin interface)
  • Trigger point: The teacher_id request parameter is processed and concatenated into a SQL query
  • Why exploitation is possible: The application appears to interpolate teacher_id directly into SQL without using prepared statements, proper escaping, or centralized validation, enabling injection of SQL syntax into the executed query

Why this happens

The core issue is the construction of SQL queries using string concatenation or similar techniques with untrusted input.

Instead of binding teacher_id as a parameter in a prepared statement, the application likely embeds it directly into the query text, which allows attackers to inject additional SQL tokens.

This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and is related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, since the tainted input is forwarded to the database as downstream output.

The pattern is an absence of strict separation between query logic and data, combined with insufficient validation and encoding.

Potential impact

  • Reading sensitive information from teacher salary tables and related administrative data
  • Modifying salary records, allocations, or teacher account details
  • Deleting or corrupting salary and academic records, impacting system integrity
  • Creating or escalating privileges of administrative accounts stored in the database
  • Pivoting to other database schemas or extracting additional application secrets, depending on database configuration

General mitigation guidance

Effective mitigation centers on treating all request parameters, including teacher_id, as untrusted and ensuring data is never concatenated into SQL:

  • Use parameterized queries or prepared statements for all database interactions so that query structure is fixed and input is bound as data only.
  • Apply strict server-side input validation for identifier fields such as teacher_id (e.g., enforcing numeric-only or fixed-format constraints) before they reach the data access layer.
  • Centralize database access through a data access layer that enforces safe query construction patterns and disallows ad-hoc dynamic SQL.
  • Limit database privileges for the application account to the minimal set needed, reducing impact if injection occurs.
  • Consider employing standardized ORM/DB libraries configured to discourage raw SQL and unsafe interpolation.

How teams detect issues like this

Detection can combine code-focused and behavior-focused approaches:

  • Static analysis: Use rules or linters that flag dynamic SQL building, string interpolation into queries, or direct $ _GET/$_POST variables used in SQL.
  • Code review: Examine admin-related scripts (including /admin/teacher-salary.php) for concatenated query strings, conditional SQL fragments, and missing input validation on identifiers.
  • Runtime monitoring: Enable database logging or web application firewalls (WAF) tuned to detect common SQL injection patterns and anomalous query structures.
  • Security testing: Incorporate automated and manual SQL injection testing into QA and CI pipelines for all endpoints that interact with the database, focusing on parameters like teacher_id.

Sources

SourceLink
github.comgithub.com/ltranquility/cve_submit/issues/6
itsourcecode.comitsourcecode.com/
vuldb.comvuldb.com/?ctiid.347660
vuldb.comvuldb.com/?id.347660
vuldb.comvuldb.com/?submit.758834

Frequently asked

questions

Yes. As long as the /admin/teacher-salary.php endpoint is reachable over the network and an attacker can send crafted requests to it, the SQL injection can be triggered remotely.

The description does not guarantee strong access control on the admin page. In many real deployments, authentication is expected, but weaknesses such as shared credentials, predictable logins, or misconfigured access controls may allow attackers to reach the vulnerable parameter. Exploitability ultimately depends on how the admin interface is exposed and protected.

Refactor the affected code so that all SQL operations use prepared statements or parameterized queries, completely removing direct concatenation of teacher_id (and other parameters) into SQL strings, while enforcing strict server-side validation rules for these inputs.

Adopt a consistent data access layer that only permits parameterized queries, enforce secure coding guidelines and reviews around database access, validate all external inputs according to strict schemas, and integrate static and dynamic security testing into the development workflow to surface injection risks early.

Find out what's already
exploitable in your codebase.