| Title | Dav-ee dairy-management-system f31a584c3330c013b61f8b0306d9e0849c6d693d SQL Injection |
|---|
| Description | The affected component is the `employees/` module. `employees/delete.php` takes `$_GET['e_payroll_no']` and interpolates it directly into a `DELETE` statement, while `employees/edit.php` interpolates the same unescaped GET parameter into the `WHERE` clause of an `UPDATE` and a `SELECT`:
```php
// employees/delete.php
$e_payroll_no = $_GET['e_payroll_no'];
mysqli_query($conn,"DELETE FROM `employees` WHERE `e_payroll_no` = '$e_payroll_no' ");
```
```php
// employees/edit.php
$e_payroll_no = $_GET['e_payroll_no'];
$sql = "UPDATE `employees` SET `e_name` = '{$_POST['e_name']}' , ... WHERE `e_payroll_no` = '$e_payroll_no' ";
$result = mysqli_query($conn,"SELECT * FROM `employees` WHERE `e_payroll_no` ='$e_payroll_no'");
```
These endpoints are reachable by a `Manager` account. A time-based payload such as `999' OR SLEEP(2) -- -` in `e_payroll_no` produced a multi-second delay (SLEEP evaluated per matching row), confirming injection. The flaw lets a Manager (or an attacker who obtains Manager access) read, modify, or delete arbitrary records in the `employees` table — including elevating their own role or resetting passwords — and it provides a primitive for broader database compromise.
|
|---|
| Source | ⚠️ https://github.com/Dav-ee/dairy-management-system/issues/3 |
|---|
| User | 7z2Z (UID 101867) |
|---|
| Submission | 10/02/2026 14:20 (16 days ago) |
|---|
| Moderation | 10/18/2026 18:26 (16 days later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 421854 [Dav-ee dairy-management-system employees/delete.php mysqli_query e_payroll_no sql injection] |
|---|
| Points | 20 |
|---|