CVE-2020-24862
📋 TL;DR
CVE-2020-24862 is a time-based blind SQL injection vulnerability in Pharmacy Medical Store and Sale Point v1.0 that allows attackers to extract database information through the catID parameter in /medical/inventories.php. This affects all users running the vulnerable version of this PHP/MySQL application. Attackers can potentially retrieve sensitive data from the database.
💻 Affected Systems
- Pharmacy Medical Store and Sale Point
📦 What is this software?
Pharmacy Medical Store And Sale Point by Pharmacy Medical Store And Sale Point Project
View all CVEs affecting Pharmacy Medical Store And Sale Point →
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including sensitive medical/store data, customer information, credentials, and potential lateral movement to other systems.
Likely Case
Data exfiltration of database contents including product information, sales records, and potentially user credentials.
If Mitigated
Limited information disclosure if proper input validation and parameterized queries are implemented.
🎯 Exploit Status
Exploit code is publicly available on Exploit-DB. Time-based blind SQL injection requires automated tools but is well-documented.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None found
Restart Required: No
Instructions:
No official patch available. Implement input validation and parameterized queries in /medical/inventories.php file.
🔧 Temporary Workarounds
Input Validation and Sanitization
allAdd server-side validation to ensure catID parameter contains only expected values
Edit /medical/inventories.php to validate catID parameter before use in SQL queries
Web Application Firewall (WAF)
allDeploy WAF rules to block SQL injection patterns
Add WAF rule to block SQL injection patterns in catID parameter
🧯 If You Can't Patch
- Isolate the application behind a reverse proxy with strict input filtering
- Implement network segmentation to limit database access from the application server
🔍 How to Verify
Check if Vulnerable:
Test the /medical/inventories.php endpoint with SQL injection payloads in catID parameter and observe time delays
Check Version:
Check application version in source code or configuration files
Verify Fix Applied:
Test with SQL injection payloads and verify no time delays or database errors occur
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in application logs
- Multiple requests with SQL-like patterns in catID parameter
- Long response times from /medical/inventories.php
Network Indicators:
- HTTP requests to /medical/inventories.php with SQL injection patterns in parameters
- Unusual database query patterns from application server
SIEM Query:
source="web_logs" AND uri="/medical/inventories.php" AND (param="catID" AND value MATCHES "(?i)(SELECT|UNION|SLEEP|WAITFOR|BENCHMARK)")
🔗 References
- https://www.exploit-db.com/exploits/48752
- https://www.sourcecodester.com/download-code?nid=14398&title=Pharmacy%2FMedical+Store+%26+Sale+Point+Using+PHP%2FMySQL+with+Bootstrap+Framework
- https://www.sourcecodester.com/php/14398/pharmacymedical-store-sale-point-using-phpmysql-bootstrap-framework.html
- https://www.exploit-db.com/exploits/48752
- https://www.sourcecodester.com/download-code?nid=14398&title=Pharmacy%2FMedical+Store+%26+Sale+Point+Using+PHP%2FMySQL+with+Bootstrap+Framework
- https://www.sourcecodester.com/php/14398/pharmacymedical-store-sale-point-using-phpmysql-bootstrap-framework.html