T03 · Remote Payload Retrieval and Execution
- Location
- ai/repos/gstack-private/SKILL.md:203
- Finding
- Unverified Remote Installer Is Piped Directly to Bash<![CDATA[ ## Vulnerability Details **File Location**: `ai/repos/gstack-private/SKILL.md:203-213` **Additional Locations**: `ai/repos/gstack-private/browse/SKILL.md:178`, `ai/repos/gstack-private/design-consultation/SKILL.md:219`, `ai/repos/gstack-private/design-review/SKILL.md:221`, `ai/repos/gstack-private/qa/SKILL.md:242`, `ai/repos/gstack-private/qa-only/SKILL.md:192`, `ai/repos/gstack-private/setup-browser-cookies/SKILL.md:185`, and generator `ai/repos/gstack-private/scripts/gen-skill-docs.ts:260` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```markdown If `NEEDS_SETUP`: 1. Tell the user: "gstack browse needs a one-time build (~10 seconds). OK to proceed?" Then STOP and wait. 2. Run: `cd <SKILL_DIR> && ./setup` 3. If `bun` is not installed: `curl -fsSL https://bun.sh/install | bash` ``` The same command is repeated in several generated or bundled gstack Skills: ```bash curl -fsSL https://bun.sh/install | bash ``` ### Technical Analysis The instruction downloads mutable content from an external domain and sends it directly to a command interpreter. The downloaded script is neither pinned to a version nor checked against a cryptographic hash or signature. It is also not saved locally for inspection before execution. Although `bun.sh` is associated with the Bun runtime required by the nested gstack tooling, executing a mutable network response means the effective code is not the same fixed code that was reviewed in this repository. Compromise of the remote service, its deployment pipeline, DNS resolution, or the TLS trust chain could change the executed payload without modifying this project. The command appears in active Skill instructions and in the source generator, so regenerating the documentation will preserve the unsafe behavior. ### Attack Path 1. An agent loads one of the bundled gstack Skills. 2. The setup check determines that the compiled browser command or Bun runtime is una ...[truncated 913 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove every pipe-to-shell installation instruction, including the template in `scripts/gen-skill-docs.ts`. 2. Require an explicitly selected and pinned Bun version. 3. Download the versioned release artifact to a local file without executing it. 4. Verify its SHA-256 digest or vendor-provided cryptographic signature against a value obtained through an independent trusted channel. 5. Display the source, version, destination, and expected filesystem changes before execution. 6. Execute the verified local installer only after separate user approval. 7. Prefer a trusted operating-system package manager where available. 8. Add a repository test that rejects patterns such as `curl ... | bash`, `wget ... | sh`, and equivalent shell substitutions in generated Skills. ]]>
