T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:25- Finding
Execution of an Unverified External Knowledge-Base Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 25-40
Vulnerability Type: T07: Tool Hijacking and Spoofing
Risk Level: MediumThe skill delegates all knowledge-base operations to a fixed Python script located outside the reviewed package. The referenced
vector_kb.pyfile is not included in the project, so its implementation and integrity cannot be verified by this audit.markdown ### 存入知识库 ```bash python C:\Users\Administrator\.openclaw\scripts\vector_kb.py add --text "内容" --source "来源"搜索知识库
bash python C:\Users\Administrator\.openclaw\scripts\vector_kb.py search --query "关键词" --top 5查看统计
bash python C:\Users\Administrator\.openclaw\scripts\vector_kb.py stats添加笔记文件
bash python C:\Users\Administrator\.openclaw\scripts\vector_kb.py add-file --path "C:\path\to\file.md"text ### Technical Analysis Each documented operation invokes `C:\Users\Administrator\.openclaw\scripts\vector_kb.py` using the local Python interpreter. Because this absolute-path script is external to the audited skill package, the behavior presented to users as a legitimate knowledge-base operation depends on mutable, unaudited local code. An attacker who can create or replace the referenced script can make ordinary skill invocations execute arbitrary Python code. The fixed path also appears to reside under an administrator profile, which could increase impact if the agent process executes with elevated privileges. The project itself does not demonstrate that the script has been replaced or that it contains malicious code; exploitation requires an attacker to obtain write access to the referenced file or its parent directory. ### Attack Path 1. An attacker obtains write access to `C:\Users\Administrator\.openclaw\scripts\` or otherwise controls `vector_kb.py`. 2. The attacker creates or replaces `vector_kb.py` with malicious Python code while preserving the expected c ...[truncated 878 chars]- Remediation
View remediation
Remediation Suggestions
- Include the required Python implementation inside the skill package so that it can be reviewed and versioned with the documentation.
- Resolve the script relative to a trusted, immutable skill installation directory rather than an external user-profile path.
- Verify the script using a cryptographic hash or digital signature before execution.
- Restrict write permissions on the script and its parent directory to trusted administrators or the package-management process.
- Run the script under a dedicated least-privileged account with access limited to the required knowledge-base directories.
- Validate and safely pass all user-controlled text, query, source, and file-path arguments in the bundled implementation.
- Fail closed when the expected script is missing, has unexpected ownership or permissions, or fails integrity verification.
