T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:24- Finding
Untrusted Script Discovery and Execution by Filename
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 24–31
Vulnerability Type: Local executable spoofing
Risk Level: HighVulnerable Code:
bash ## Script Location Locate the script in your skills directory: find ~ -name manga_scraper.py 2>/dev/null ## Setup Check python3 /path/to/manga_scraper.py --helpTechnical Analysis
The project does not include the referenced
manga_scraper.pyscript. Instead, the instructions tell the user or agent to search the entire home directory for any file with that name and then execute the discovered file with Python.Filename-based discovery does not establish the script's provenance, ownership, integrity, or relationship to this Skill. An attacker who can create a file anywhere beneath the user's home directory can place a malicious
manga_scraper.pythere. If that file is selected from the search results and executed, its top-level Python code runs immediately, even when invoked only with--help.Because multiple matching paths may be returned, the documentation also provides no deterministic or safe selection rule. This creates a local tool-spoofing opportunity in which an unrelated or attacker-controlled executable can masquerade as the expected scraper.
Attack Path
- An attacker obtains the ability to place a file under any directory within the target user's home directory, such as through another downloaded archive, shared workspace, or compromised local process.
- The attacker creates a malicious file named
manga_scraper.py. - The user or agent follows the Skill instructions and runs
find ~ -name manga_scraper.py. - The attacker-controlled file appears among the search results and is mistaken for the required Skill script.
- The user or agent invokes the file with Python.
- Python executes its top-level payload with the privileges of the invoking account.
Impact Assessment
Successful exploitation permits ...[truncated 486 chars]
- Remediation
View remediation
Remediation Suggestions
- Include
manga_scraper.pyinside the reviewed Skill package rather than searching the home directory for it. - Resolve the executable through a fixed path relative to the verified Skill directory.
- Refuse to execute a script when its resolved path falls outside the expected package directory.
- Verify the script against a pinned cryptographic hash or a trusted digital signature before execution.
- Check file ownership and reject files writable by untrusted users where the deployment model supports multiple users.
- Avoid automatically selecting the first result from a broad filesystem search.
- Document the exact expected path and fail closed if the bundled script is absent.
- Review the actual script as part of the Skill audit before distributing instructions that execute it.
- Include
