T09 · Insecure Skill Coding Practices
- Location
scripts/setup-vault.sh:20- Finding
Existing Memory Symlink Is Accepted Without Target Validation
- Content
View full analysis
$MEMORY_DIR" fi ``` ### Technical Analysis The script treats any existing `$WIKI_DIR/memory` symbolic link as valid. It does not resolve the link or verify that its canonical target is the configured `MEMORY_DIR`. Consequently, a stale, misconfigured, or attacker-created symbolic link can point to an unrelated directory while the setup process reports success. Because the wiki is subsequently opened as an Obsidian vault, files under the unintended target may be displayed, searched, indexed by enabled Obsidian functionality, or modified through the user interface. Exploitation requires an attacker or another local process to be able to create or alter the link in the user-controlled wiki directory. This does not independently bypass operating-system permissions; Obsidian and the script retain the privileges of the invoking user. ### Attack Path 1. The attacker obtains write access to the victim's wiki directory or otherwise influences its preexisting contents. 2. The attacker creates `$WIKI_DIR/memory` as a symbolic link to another directory accessible to the victim, such as a directory containing unrelated private documents. 3. The victim runs `scripts/setup-vault.sh`. 4. The script detects that `memory` is a symbolic link but does not inspect its target. 5. The script reports that the memory link already exists and continues successfully. 6. The victim opens `$WIKI_DIR` as an Obsidian vault. 7. The unintended target's files become accessible through the ...[truncated 548 chars]- Remediation
View remediation
