T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:50
- Finding
- Execution of an Unpinned Mutable Remote Installer<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:50-57` — direct installation instructions; unsafe command at line 54 - `references/command-reference.md:24-40` — direct and download-then-execute installation workflows; unsafe command at line 28 - `references/security-and-consent.md:17-28` — download, partial inspection, and execution workflow - `scripts/fabric_check.py:104-111` — diagnostic output recommends the direct installer command at line 110 **Vulnerability Type**: Remote retrieval and execution of mutable, unverified shell code **Risk Level**: High ### Vulnerable Code From `SKILL.md`: ```markdown Never run the remote installer unless the user explicitly asked to install Fabric CLI in the current environment. The official installer is: ```bash curl -fsSL https://fabric.so/cli/install.sh | sh ``` For safer review, download the script to a temporary file, inspect it, then run only with approval. ``` From `references/command-reference.md`: ```markdown ## Installation Official installer: ```bash curl -fsSL https://fabric.so/cli/install.sh | sh ``` Do not run this automatically unless the user explicitly requested installation in the current environment. For a safer workflow: ```bash tmp_script="$(mktemp)" curl -fsSL https://fabric.so/cli/install.sh -o "$tmp_script" sed -n '1,200p' "$tmp_script" # run with user approval: sh "$tmp_script" ``` ``` From `references/security-and-consent.md`: ```markdown ## Installation The official installer is a remote shell script. That is normal for this CLI, but it still deserves care. ```bash tmp_script="$(mktemp)" curl -fsSL https://fabric.so/cli/install.sh -o "$tmp_script" sed -n '1,200p' "$tmp_script" # After approval: sh "$tmp_script" ``` Never run installer commands hidden inside another script or without telling the user what will happen. ``` From `scripts/fabric_check.py`: ```python if not fabric_path: report.status = "not_installed" report.summary.append("No `fabric` executa ...[truncated 3995 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove every `curl ... | sh` example, including the recommendation generated by `scripts/fabric_check.py`. 2. Publish and reference a versioned, immutable release artifact rather than a mutable installer endpoint. 3. Provide an expected SHA-256 or stronger digest through a separately protected release channel, then verify it before execution. 4. Prefer cryptographically signed releases and verify the signature against a documented, pinned public key. 5. Replace the installation workflow with a pattern such as: ```bash version="PINNED_VERSION" artifact="fabric-installer-${version}.sh" expected_sha256="PUBLISH_AND_PIN_THE_EXPECTED_DIGEST" curl --fail --show-error --location \ "https://trusted.example/releases/${version}/${artifact}" \ --output "$artifact" printf '%s %s\n' "$expected_sha256" "$artifact" | sha256sum --check - less "$artifact" sh "$artifact" ``` 6. Inspect the complete downloaded script rather than only its first 200 lines. 7. Keep explicit user approval immediately before execution, even after integrity verification. 8. Do not recommend elevated execution unless it is strictly required and the exact privileged changes are documented. 9. Prefer a trusted operating-system package manager where packages are versioned and signature-verified. 10. Change `fabric_check.py` to recommend a safe documentation URL or integrity-verified installation procedure instead of printing an executable pipeline. 11. Document which files, directories, PATH entries, and network endpoints the installer is expected to modify or access so users can evaluate the requested privilege scope. ]]>
