| عنوان | amirhamza05 Student-Management-System 1.0 Arbitrary SQL Execution |
|---|
| الوصف | An 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. |
|---|
| المصدر | ⚠️ https://github.com/amirhamza05/Student-Management-System/issues/73 |
|---|
| المستخدم | xiaolinmu (UID 102408) |
|---|
| ارسال | 24/10/2026 10:53 AM (1 شهر منذ) |
|---|
| الاعتدال | 23/11/2026 07:31 PM (1 month later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 442501 [amirhamza05 Student-Management-System حتى 449397e35d42e3779f14f0bfc654ab307103f7e3 SQL Editor sql_editor.php sql_editor_run تجاوز الصلاحيات] |
|---|
| النقاط | 20 |
|---|