T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:48- Finding
Execution of an Unverified External CLI with Access to Exported Credentials
- Content
View full analysis
/nano-banana.js`. ``` ```markdown ## How Your Agent Should Use This 1. **Read the request and pick a model.** "Pro" → `pro`. "Fast" / "Flash" → `flash`. Otherwise → `pro`. 2. **Write the prompt in English.** Gemini image models work best in English even when the chat is in another language. Translate any non-English description into a clear, descriptive English prompt. 3. **Run the CLI** via `exec`. Capture the output path. 4. **Deliver the image** by adding `MEDIA:` on its own line in the reply (or use your platform's attachment convention). 5. **Reply** with a short caption + which model was used. ``` ### Technical Analysis The Skill instructs the Agent to execute `~/bin/nano-banana`, but the executable and its stated Node.js source are not included in the audited project. Consequently, the behavior described in the API contract cannot be verified against an implementation. A path under a user's home directory is mutable and may also be a symbolic link. The instructions do not require the Agent to validate the executable's canonical path, ownership, permissions, symlink target, cryptographic digest, or signature before execution. An attacker who can create or replace that path could therefore cause a legitimate-looking Skill invocation to execute attacker-controlled code. The risk is amplified because the Gemini API key is first exported as `GEMINI_API_KEY`. The subsequently launched CLI inherits this environment variable. File mode `600` ap ...[truncated 2197 chars]- Remediation
View remediation
