T05 · Unauthorized Access and Privilege Escalation
- Location
main.py:191- Finding
Unrestricted Disclosure of Locally Accessible Files
- Content
View full analysis
10 * 1024 * 1024: return { "status": "error", "message": f"文件过大({file_size / (1024 * 1024):.2f} MB),超过 10 MB 限制。" } return { "status": "success", "message": f"正在发送文件:{file_info['filename']}", "file": { "path": file_path, "name": file_info['filename'], "content": base64.b64encode(file_content).decode('utf-8') } } except Exception as e: return { "status": "error", "message": f"发送文件时出错:{str(e)}" } ``` ### Technical Analysis The skill searches the system-wide Everything index and stores the resulting absolute paths in the global `search_results` list. The `send_file` function subsequently opens a selected result using the privileges of the hosting process and returns the entire file content as Base64. No authorization check, approved-directory policy, sensitive-file exclusion, path validation, or user confirmation is applied before the file is read. Consequently, the only effective security boundary is the operating-system identity under which the skill host runs. The numerical result index does not provide a meaningful access-control boundary because the caller can influence the search query and then select any returned result. Although the file-transfer feature is documented, its implementation permits broad filesystem access without controls limiting it to files appropriate for the current caller ...[truncated 1200 chars]- Remediation
View remediation
