CVE-2025-5762

6.3 MEDIUM

📋 TL;DR

A critical SQL injection vulnerability exists in code-projects Patient Record Management System 1.0, specifically in the view_hematology.php file's itr_no parameter. This allows remote attackers to execute arbitrary SQL commands on the database. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • code-projects Patient Record Management System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Any installation with view_hematology.php accessible is vulnerable. The system must be internet-facing or accessible to attackers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including patient record theft, data destruction, and potential system takeover via SQL injection leading to remote code execution.

🟠

Likely Case

Unauthorized access to sensitive patient data, database manipulation, and potential privilege escalation.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only error messages or limited data exposure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit details are publicly available in GitHub repositories. SQL injection via itr_no parameter requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://code-projects.org/

Restart Required: No

Instructions:

1. Check code-projects.org for official patch. 2. If no patch, implement input validation and parameterized queries. 3. Replace vulnerable view_hematology.php file with secure version.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize itr_no parameter before processing

// In view_hematology.php, add: $itr_no = filter_var($_GET['itr_no'], FILTER_SANITIZE_NUMBER_INT);

Web Application Firewall Rule

all

Block SQL injection patterns targeting itr_no parameter

WAF rule: Block requests containing SQL keywords in itr_no parameter

🧯 If You Can't Patch

  • Implement network segmentation to restrict access to the vulnerable system
  • Deploy a web application firewall with SQL injection protection rules

🔍 How to Verify

Check if Vulnerable:

Test view_hematology.php with SQL injection payloads in itr_no parameter (e.g., view_hematology.php?itr_no=1' OR '1'='1)

Check Version:

Check system documentation or configuration files for version information

Verify Fix Applied:

Verify parameterized queries are used and input validation prevents SQL injection payloads

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed login attempts or parameter manipulation in access logs

Network Indicators:

  • HTTP requests with SQL keywords in itr_no parameter
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND (uri="*view_hematology.php*" AND (query="*itr_no=*'*" OR query="*itr_no=*%27*" OR query="*itr_no=* OR *" OR query="*itr_no=* UNION *"))

🔗 References

📤 Share & Export