T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:10
- Finding
- Unnecessary Filesystem Permission Violates Least Privilege<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10–13 **Vulnerability Type**: Excessive tool permission **Risk Level**: Medium ### Vulnerable Code ```yaml openclaw: requires: tools: [filesystem] install: "npx clawhub install self-defense-fundamentals" ``` ### Technical Analysis The skill declares the `filesystem` tool as a requirement, but none of its documented self-defense workflows require reading, creating, modifying, or deleting files. The remaining content consists entirely of conversational guidance, state fields, and automation triggers. Granting filesystem access beyond the skill's legitimate functional requirements violates the principle of least privilege. The exact exposure depends on how the host scopes the filesystem tool. If it permits broad access, a loaded skill could potentially access project files, user documents, configuration files, credentials, or other sensitive local data. The audited file does not contain instructions that actively exploit this permission. The vulnerability is the unnecessary capability declaration and the resulting increase in attack surface. ### Attack Path 1. A user installs or activates the skill. 2. The host processes `openclaw.requires.tools` and grants the declared filesystem capability. 3. The skill receives filesystem access despite having no legitimate workflow that requires it. 4. If the skill instructions, package content, or execution context are later compromised, the unnecessary capability may be used to inspect or alter files within the tool's permitted scope. ### Impact Assessment A successful abuse could expose the confidentiality or integrity of files available through the filesystem tool. Potential impact includes reading sensitive local data, modifying project content, or damaging user files. No privilege beyond the filesystem tool's host-defined scope is established by the audited content, and no active filesystem abuse was found. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove `filesystem` from `openclaw.requires.tools`, because the documented functionality does not use it. - Apply deny-by-default tool permissions and grant capabilities only when a concrete workflow requires them. - If future functionality requires persistence, use a narrowly scoped state API or a dedicated skill-specific directory rather than general filesystem access. - Restrict filesystem operations to an explicit allowlisted directory and prohibit access to credentials, home directories, system configuration, and unrelated project files. - Add automated manifest validation that flags declared tools not referenced by any documented or implemented workflow. ]]>
