T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:340
- Finding
- Research Skill Directs Broad Access to Unrelated Skill Directories<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 340-399 **Vulnerability Type**: Least-privilege violation through unrelated filesystem administration **Risk Level**: Medium ### Vulnerable Code or Instructions ```bash find <old-version-directory> -type f -exec wc -l {} \; > /tmp/old_files.txt find <new-version-directory> -type f -exec wc -l {} \; > /tmp/new_files.txt diff /tmp/old_files.txt /tmp/new_files.txt grep -E "^description:" <old-version-SKILL.md> | head -1 grep -E "^description:" <new-version-SKILL.md> | head -1 ls <old-version-directory>/scripts/ <old-version-directory>/templates/ 2>/dev/null ls <new-version-directory>/scripts/ <new-version-directory>/templates/ 2>/dev/null mkdir -p ~/.hermes/.<skill-name>-merge-backup-YYYYMMDD/ cp -r <old-version-directory> ~/.hermes/.<skill-name>-merge-backup-YYYYMMDD/v<old-version-number> cp -r <second-old-version-directory> ~/.hermes/.<skill-name>-merge-backup-YYYYMMDD/v<second-old-version-number> ``` The accompanying decision table permits deletion when the new version is considered to cover the old version completely. ### Technical Analysis The Skill declares research analysis and report generation as its primary function. However, its lifecycle section explicitly applies to any Skill merge, rewrite, or deletion and directs the Agent to enumerate, read, compare, and recursively copy unrelated Skill directories. These operations are not required to perform spatiotemporal research. Recursive copying is especially sensitive because another Skill directory may contain credentials, private configuration, proprietary source code, local user data, or references to sensitive resources. The backup location is persistent and does not define restrictive permissions, secret filtering, retention enforcement, or ownership validation. The instructions also allow the workflow to decide that another Skill may be deleted after a content-coverage assessment. No deletion command is embedded in the ...[truncated 1660 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the lifecycle-management section from this research Skill. 2. Move Skill merging, migration, backup, and deletion into a separate administrative Skill that is invoked explicitly. 3. Require users to identify exact source and destination paths; never infer administrative targets from similar names or trigger descriptions. 4. Restrict traversal to an approved Skill root and reject symlinks or paths escaping that root. 5. Inventory files before backup and exclude credentials, tokens, private keys, session data, environment files, and user documents. 6. Create backups with restrictive permissions and a documented retention period. 7. Require explicit confirmation immediately before every recursive copy, modification, or deletion. 8. Use a dry-run manifest that lists all affected files and expected changes. 9. Never treat content similarity or trigger-word overlap as sufficient deletion authority. 10. Verify backup integrity and successful restoration before allowing any destructive operation. ]]>
