T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:105- Finding
Execution of an Unverified External Lint Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 105-110
Vulnerability Type: Unverified execution of a mutable external tool
Risk Level: HighEvidence
markdown When the user requests a wiki health check, or automatically after every 10 ingest operations: ### Step 1 — Run the tool ```bash bash /Users/clax/Documents/doc_synced/llm-wiki/tools/lint.shtext The displayed prose is an English translation of the surrounding instructions; the shell command is reproduced verbatim. ### Technical Analysis The skill instructs the agent to execute a shell script at a fixed absolute path outside the audited project. The referenced `lint.sh` is not included in the package, so its contents, provenance, permissions, and integrity cannot be assessed. Invoking the file explicitly through `bash` treats all of its contents as executable shell code. If another process or user can replace or modify the script, a legitimate-looking lint action becomes an arbitrary command-execution channel. The automatic trigger after every ten ingest operations further increases exposure because execution does not necessarily require a separate, explicit request at the time the command runs. This is classified as tool hijacking because the trusted lint operation can be replaced with attacker-controlled behavior without changing the reviewed skill file. ### Attack Path 1. An attacker obtains write access to `/Users/clax/Documents/doc_synced/llm-wiki/tools/lint.sh` or replaces a writable component in its path. 2. The attacker inserts arbitrary shell commands into the script. 3. A user requests a lint operation, or the automatic ten-ingest threshold is reached. 4. The agent executes the external file using `bash`. 5. The injected commands run with the operating-system identity and environment of the agent process. ### Impact Assessment Successful exploitation permits arbitrary command execution with the agent proce ...[truncated 386 chars]- Remediation
View remediation
Remediation Suggestions
- Include the lint implementation inside the reviewed skill package rather than referencing a mutable absolute path.
- Verify the script against a pinned cryptographic digest immediately before execution.
- Refuse to run the script when its owner, permissions, resolved path, or digest differs from the approved configuration.
- Require explicit user confirmation before each execution; remove the automatic ten-ingest execution trigger.
- Run linting in a sandbox with read-only access wherever possible, no unnecessary credentials, restricted network access, and write access limited to explicitly approved wiki files.
- Prefer a structured lint API or an audited executable with fixed arguments instead of invoking an unrestricted shell interpreter.
- Resolve and validate the canonical path to prevent symbolic-link or path-component replacement attacks.
