T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:77
- Finding
- Unverified Remote Payload Retrieval and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 77-92 and 96-123 **Vulnerability Type**: Remote executable retrieval without integrity verification **Risk Level**: High ### Vulnerable Code ```bash # Detect platform and set download URL PLATFORM=$(uname -s)-$(uname -m) case "$PLATFORM" in Darwin-arm64) DOWNLOAD_URL="https://cartogopher.com/downloads/cartogopher/v4/mac/arm64" ;; Darwin-x86_64) DOWNLOAD_URL="https://cartogopher.com/downloads/cartogopher/v4/mac/intel" ;; Linux-x86_64) DOWNLOAD_URL="https://cartogopher.com/downloads/cartogopher/v4/linux/amd64" ;; Linux-aarch64) DOWNLOAD_URL="https://cartogopher.com/downloads/cartogopher/v4/linux/arm64" ;; *) echo "Unsupported platform: $PLATFORM"; exit 1 ;; esac # Download, extract, and clean up curl -sL "$DOWNLOAD_URL" -o cg.zip && unzip cg.zip -d ~/.cartogopher/mcp-server && rm cg.zip ``` ```bash cd ~/.cartogopher/mcp-server npm install ``` The platform-specific alternatives perform the same unverified retrieval: ```bash curl -sL https://cartogopher.com/downloads/cartogopher/v4/mac/arm64 -o cg.zip && unzip cg.zip -d ~/.cartogopher/mcp-server && rm cg.zip curl -sL https://cartogopher.com/downloads/cartogopher/v4/mac/intel -o cg.zip && unzip cg.zip -d ~/.cartogopher/mcp-server && rm cg.zip curl -sL https://cartogopher.com/downloads/cartogopher/v4/linux/amd64 -o cg.zip && unzip cg.zip -d ~/.cartogopher/mcp-server && rm cg.zip curl -sL https://cartogopher.com/downloads/cartogopher/v4/linux/arm64 -o cg.zip && unzip cg.zip -d ~/.cartogopher/mcp-server && rm cg.zip ``` ### Technical Analysis The Skill downloads a ZIP archive from an external, mutable URL and installs its contents without validating a cryptographic checksum or digital signature. The downloaded package later supplies `cartogopher-mcp.js`, which is executed by Node.js as the configured MCP server. The URL includes a nominal `v4` path but does not identify an immutable release artifact or verify that the received ...[truncated 2113 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Publish each supported archive as an immutable, versioned release artifact rather than serving mutable platform endpoints. 2. Publish SHA-256 or stronger digests through a separately protected release channel and verify the selected archive before extraction. 3. Digitally sign release manifests or artifacts and verify signatures against a pinned vendor public key. 4. Configure downloads to reject unexpected redirects or verify that the final redirect destination uses HTTPS and belongs to an explicit allowlist. 5. Download into a newly created, permission-restricted temporary directory and inspect archive paths before extraction to prevent path traversal or unexpected overwrites. 6. Ship and require a reviewed lockfile. Use `npm ci` rather than `npm install` to ensure deterministic dependency resolution. 7. Use `npm ci --ignore-scripts` where lifecycle scripts are unnecessary. If scripts are required, document and audit each one before execution. 8. Perform installation and MCP execution as an unprivileged user and restrict the MCP server's filesystem and network access to the minimum required workspace and endpoints. ]]>
