T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:25
- Finding
- Unverified Mutable Binaries Are Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 25-31, 46-59, 74-89, and 98-110 **Vulnerability Type**: Remote payload retrieval and execution without integrity verification **Risk Level**: High ### Vulnerable Code ```bash # Resolve latest versions CLI_VER=$(curl -sL "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/cli-mlx/latest") LAUNCHER_VER=$(curl -sL "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/launcher-mlx/latest") echo "Installing xcli $CLI_VER, launcher $LAUNCHER_VER" # Download binaries curl -L -o /usr/local/bin/xcli "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/cli-mlx/${CLI_VER}/xcli_linux_amd64" curl -L -o /usr/local/bin/mlx-launcher "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/launcher-mlx/${LAUNCHER_VER}/launcher-linux_amd64.bin" # Make executable chmod +x /usr/local/bin/xcli /usr/local/bin/mlx-launcher # Verify xcli --help mlx-launcher --help ``` The macOS instructions additionally disable a platform security control: ```bash # macOS may quarantine downloaded binaries — remove the flag xattr -d com.apple.quarantine /usr/local/bin/xcli 2>/dev/null xattr -d com.apple.quarantine /usr/local/bin/mlx-launcher 2>/dev/null ``` Equivalent unverified downloads are also provided for Windows: ```powershell $CLI_VER = (Invoke-WebRequest -Uri "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/cli-mlx/latest").Content.Trim() $LAUNCHER_VER = (Invoke-WebRequest -Uri "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/launcher-mlx/latest").Content.Trim() Invoke-WebRequest -Uri "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/cli-mlx/${CLI_VER}/xcli_windows_amd64.exe" -OutFile "$env:USERPROFILE\xcli.exe" Invoke-WebRequest -Uri "https://ml000x-dev-dists.s3.eu-north-1.amazonaws.com/launcher-mlx/${LAUNCHER_VER}/launcher-windows_amd64.exe" -OutFile "$env:USERPROFILE\mlx-launcher.exe" ``` ### Technical Analysis The installation procedure retrieves native executables based on mutable `latest` end ...[truncated 2093 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin exact reviewed versions instead of resolving versions through mutable `latest` endpoints. 2. Publish and pin SHA-256 or stronger cryptographic hashes for every supported platform binary. 3. Verify hashes before applying executable permission or invoking a downloaded file, and fail closed on any mismatch. 4. Prefer vendor-signed packages and verify platform-native signatures, such as Apple code signing and notarization or Authenticode on Windows. 5. Do not automatically remove the macOS quarantine attribute. Direct users through normal Gatekeeper verification and document how to validate the publisher. 6. Prefer an authenticated package repository or official package manager with signed metadata and reproducible version selection. 7. Install to a user-controlled directory unless system-wide installation is explicitly required. Avoid administrative execution where possible. 8. Separate downloading from execution and require explicit user approval after displaying the pinned version, source, checksum, and verified signer. ]]>
