Lucene search
K

Computer Laboratory Management System 1.0 Privilege Escalation Vulnerability

🗓️ 07 Aug 2024 00:00:00Reported by Sampath Kumar KadajariType 
zdt
 zdt
🔗 0day.today👁 142 Views

Computer Laboratory Management System v1.0 Privilege Escalation Vulnerability due to Incorrect Access Control in delete_category functio

Related
Code
ReporterTitlePublishedViews
Family
CNNVD
Computer Laboratory Management System 安全漏洞
4 Aug 202400:00
cnnvd
CVE
CVE-2024-41332
9 Aug 202400:00
cve
Cvelist
CVE-2024-41332
9 Aug 202400:00
cvelist
NVD
CVE-2024-41332
12 Aug 202413:38
nvd
Packet Storm
Computer Laboratory Management System 1.0 Privilege Escalation
2 Aug 202400:00
packetstorm
RedhatCVE
CVE-2024-41332
9 Jan 202609:35
redhatcve
Vulnrichment
CVE-2024-41332
9 Aug 202400:00
vulnrichment
# Exploit Title: Computer Laboratory Management System v1.0 - Incorrect access control
# 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

07 Aug 2024 00:00Current
6.6Medium risk
Vulners AI Score6.6
CVSS 3.16.5
EPSS0.00084
SSVC
142