T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:1104
- Finding
- Unverified Mutable Remote Binary Is Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:1104-1110` **Additional Locations**: `SKILL.md:982-983`, `README.md:134-142`, `README.html:754-760` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash mkdir -p ~/xiaohongshu-mcp && cd ~/xiaohongshu-mcp wget https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/xiaohongshu-mcp-linux-amd64.tar.gz tar xzf xiaohongshu-mcp-linux-amd64.tar.gz chmod +x xiaohongshu-* export ROD_DEFAULT_TIMEOUT=10m DISPLAY=:99 nohup ./xiaohongshu-mcp-linux-amd64 -port :18060 > mcp.log 2>&1 & ``` ### Technical Analysis The installation instructions retrieve a native executable from the mutable `latest` release of a personal GitHub repository. The archive is neither cryptographically signed nor checked against an expected digest before extraction and execution. Because the `latest` reference can resolve to different content after this Skill has been audited, the effective executable payload is outside the reviewed artifact and can change without a corresponding Skill update. The wildcard command `chmod +x xiaohongshu-*` also grants executable permission to every matching extracted file instead of only one validated binary. Although an MCP component is relevant to publishing, downloading and immediately running an unverified native executable is not the minimum safe privilege model for that functionality. ### Attack Path 1. An attacker compromises the upstream GitHub account, release workflow, repository credentials, or release asset. 2. The attacker replaces or republishes the asset referenced by the mutable `latest` URL. 3. A user or Agent follows the documented installation procedure. 4. The malicious archive is extracted without archive-entry validation or integrity verification. 5. Matching files are made executable. 6. The downloaded binary is launched with `nohup` under the installing user's account. 7. The process can access file ...[truncated 447 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `latest` with a reviewed, immutable release version. 2. Publish and verify a trusted SHA-256 digest before extraction. 3. Require a verifiable release signature from a documented maintainer key. 4. Download to a private temporary directory and abort on any verification failure. 5. Inspect archive entries before extraction and reject absolute paths, symbolic-link escapes, and `../` traversal. 6. Grant executable permission only to the exact expected file. 7. Run the MCP process in a restricted container or sandbox with narrowly scoped filesystem and network access. 8. Avoid inheriting unrelated environment secrets. 9. Document the upstream trust relationship and provide reproducible build instructions. ]]>
