漏洞总结:Path Traversal Leading to Arbitrary File Read (#2734) 1. 漏洞概述 漏洞名称: Path Traversal Leading to Arbitrary File Read (路径遍历导致任意文件读取) CVSS v3.1 评分: 9.1 (Critical / 严重) CWE: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) 漏洞描述: Web Console 中的 端点接受一个 参数,该参数直接传递给文件读取操作,且未进行任何路径验证或清理。攻击者可以通过使用 序列,读取服务器上的任何文件(包括系统文件、配置文件、SSH 密钥等敏感信息)。 攻击向量: Network (网络) 认证要求: None (无需认证) 2. 影响范围 受影响产品: chatgpt-on-wechat (CowAgent) 受影响版本: 2.0.4 及更早版本 受影响组件/文件: (lines 1281-1297, ) (lines 146-155, ) 3. 概念验证 (POC) 代码 自动化利用脚本 (Automated Exploitation Script): 手动测试命令 (Curl Examples): 4. 修复方案 (Remediation) 官方建议实施路径规范化 (Path canonicalization) 和目录限制 (Directory confinement)。 修复后的代码示例 ( 方法): 其他修复建议:** 1. 为所有 Web Console 端点添加认证 (Authentication)。 2. 验证 参数不包含 序列。 3. 实施允许的文件扩展名白名单 (Allowlist of permitted file extensions)。