Submit #1055647: amirhamza05 Student-Management-System 1.0 Arbitrary SQL Executioninfo

Titleamirhamza05 Student-Management-System 1.0 Arbitrary SQL Execution
DescriptionAn arbitrary SQL execution vulnerability exists in the SQL Editor functionality. The server accepts the `sql_editor_run` POST parameter and passes its value directly to `mysqli_query` without validating the statement type, enforcing a read-only restriction, or checking whether the authenticated user has administrative privileges. The only access control applied to the entry point is a check that the session is non-empty. As a result, any authenticated user—including the lowest-privilege Teacher account (`permit=8`)—can execute arbitrary SQL statements such as `SELECT`, `UPDATE`, `DELETE`, and `DROP`. The vulnerable flow is: - `page_action/nav_bar/sql_editor.php:5` assigns `$sql=$_POST['sql_editor_run'];` - `page_action/nav_bar/sql_editor.php:11` executes `$result=$db->select($sql);` - `config/connect.php:59-61` calls `mysqli_query($this->conn, $query)` without statement-type checks The SQL Editor menu is visible to all logged-in users, and the `permit` role value is not consulted anywhere in the execution path.
Source⚠️ https://github.com/amirhamza05/Student-Management-System/issues/73
User
 xiaolinmu (UID 102408)
Submission10/24/2026 10:53 (1 month ago)
Moderation11/23/2026 19:31 (1 month later)
StatusAccepted
VulDB entry442501 [amirhamza05 Student-Management-System up to 449397e35d42e3779f14f0bfc654ab307103f7e3 SQL Editor sql_editor.php sql_editor_run authorization]
Points20

Interested in the pricing of exploits?

See the underground prices here!