Title | Projectworlds Life Insurance Management System in PHP v1.0 SQL Injection |
---|
Description | # Projectworlds Life Insurance Management System in PHP Project V1.0 /editAgent.php?agent_id=1 SQL injection
# NAME OF AFFECTED PRODUCT(S)
- Life Insurance Management System in PHP
## Vendor Homepage
- https://projectworlds.in/free-projects/php-projects/online-examination/
# AFFECTED AND/OR FIXED VERSION(S)
## submitter
- lql120
## Vulnerable File
- /editAgent.php?agent_id=1
## VERSION(S)
- V1.0
## Software Link
- https://projectworlds.in/life-insurance-management-system-in-php/
# PROBLEM TYPE
## Vulnerability Type
- SQL injection
## Root Cause
- A SQL injection vulnerability was found in the ' /editAgent.php?agent_id=1' file of the 'Life Insurance Management System in PHP' project. The reason for this issue is that attackers inject malicious code from the parameter ' agent_id‘ 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 "Life Insurance Management System in PHP",I discovered a critical SQL injection vulnerability in the " /editAgent.php?agent_id=1" file. This vulnerability stems from insufficient user input validation of the ' agent_id' 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.
# No login or authorization is required to exploit this vulnerability
# Vulnerability details and POC
## Vulnerability lonameion:
- ' agent_id' parameter
## Payload:
```makefile
Parameter: agent_id (GET)
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: agent_id=1' AND (SELECT 6942 FROM (SELECT(SLEEP(5)))LrYO) AND 'QMEV'='QMEV
```
## The following are screenshots of some specific information obtained from testing and running with the sqlmap tool:
```bash
python sqlmap.py -u x.x.x.x:81/editAgent.php?agent_id=1 --dbs -batch
```
<img width="803" alt="Image" src="https://github.com/user-attachments/assets/9dba3a6d-d16c-43bc-9a4d-aaf9e9dfb912" />
# 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.
|
---|
Source | ⚠️ https://github.com/ubfbuz3/cve/issues/7 |
---|
User | lql120 (UID 82139) |
---|
Submission | 03/05/2025 08:03 AM (4 months ago) |
---|
Moderation | 03/06/2025 05:01 PM (1 day later) |
---|
Status | Accepted |
---|
VulDB Entry | 298821 [projectworlds Life Insurance Management System 1.0 /editAgent.php agent_id sql injection] |
---|
Points | 20 |
---|