| Reporter | Title | Published | Views | Family All 7 |
|---|---|---|---|---|
| Computer Laboratory Management System 1.0 Privilege Escalation Vulnerability | 7 Aug 202400:00 | – | zdt | |
| Computer Laboratory Management System 安全漏洞 | 4 Aug 202400:00 | – | cnnvd | |
| CVE-2024-41332 | 9 Aug 202400:00 | – | cve | |
| CVE-2024-41332 | 9 Aug 202400:00 | – | cvelist | |
| CVE-2024-41332 | 12 Aug 202413:38 | – | nvd | |
| CVE-2024-41332 | 9 Jan 202609:35 | – | redhatcve | |
| CVE-2024-41332 | 9 Aug 202400:00 | – | vulnrichment |
`# Exploit Title: Computer Laboratory Management System v1.0 - Incorrect access control
# Date: 08 July 2024
# Exploit Author: Sampath kumar kadajari
# Vendor Homepage: https://www.sourcecodester.com/php/17268/computer-laboratory-management-system-using-php-and-mysql.html
# Software Link: https://www.sourcecodester.com/download-code?nid=17268&title=Computer+Laboratory+Management+System+using+PHP+and+MySQL
# Version: v1.0
# CVE: CVE-2024-41332
# Tested on: Windows, XAMPP, Apache, MySQL
-------------------------------------------------------------------------------------------------------------------------------------------
Incorrect access control in the delete_category function of Sourcecodester Computer Laboratory Management System v1.0 allows authenticated attackers with low-level privileges to perform arbitrarily delete actions.
"Vulnerable Code" – ( classes/master.php)
function delete_category(){
extract($_POST);
$del = $this->conn->query("UPDATE `category_list` set `delete_flag` = 1 where id = '{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success'," Category successfully deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
---> Affected Component: http://localhost/php-lms/classes/Master.php?f=delete_category
"Fix for Vulnerable Code":
function delete_category(){
// Check if the user is logged in and has an admin role
if (!isset($_SESSION['userdata']['role']) || $_SESSION['userdata']['role'] != 'admin') {
$resp['status'] = 'failed';
$resp['error'] = 'Unauthorized access.';
return json_encode($resp);
}
// Proceed with the delete action if authorized
extract($_POST);
$del = $this->conn->query("UPDATE `category_list` set `delete_flag` = 1 where id = '{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success',"Category successfully deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
`
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