| 标题 | imvks786 student_management_system 1.0 SQL Injection |
|---|
| 描述 | The administrator login endpoint constructs an SQL query by directly embedding the user‑supplied `a_usr` (username) and `a_pwd` (password) without any sanitisation or parameterisation:
```php
$a_usr = $_POST['a_usr'];
$a_pwd = $_POST['a_pwd'];
$ret = mysqli_query($con, "SELECT * FROM admin WHERE userid='$a_usr' AND password='$a_pwd' ");
```
Because no input validation or query parameterisation is applied, an attacker can inject a boolean‑based payload into the username field. The payload admin' OR '1'='1 transforms the query into one that always returns at least one row, completely bypassing the password check. The server then sets a session and redirects to the admin dashboard, granting full administrative access. |
|---|
| 来源 | ⚠️ https://github.com/imvks786/student_management_system/issues/2 |
|---|
| 用户 | Yeliuyun (UID 94203) |
|---|
| 提交 | 2026-05-25 06時00分 (16 日前) |
|---|
| 管理 | 2026-06-07 21時53分 (14 days later) |
|---|
| 状态 | 已接受 |
|---|
| VulDB条目 | 369148 [imvks786 student_management_system 直到 9599b560ad3c3b83e75d328b76bedcd489ef1f46 Administrator Login Endpoint admin/admin_login.php a_usr/a_pwd SQL注入] |
|---|
| 积分 | 20 |
|---|