T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/webbridge-crawl.ts:74
- Finding
- Automatic Execution of an Unverified Remote Installer<![CDATA[ ## Vulnerability Details **File Location**: `scripts/webbridge-crawl.ts:74-89`; also documented in `SKILL.md:33-40` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```typescript // 1. Check if executable exists if (!fs.existsSync(wbPath)) { console.log('🔍 未检测到 Kimi WebBridge 安装,正在为您自动下载并安装...'); try { if (isWin) { execSync('powershell -Command "irm https://cdn.kimi.com/webbridge/install.ps1 | iex"', { stdio: 'inherit' }); } else { execSync('curl -fsSL https://cdn.kimi.com/webbridge/install.sh | bash', { stdio: 'inherit' }); } console.log('✅ Kimi WebBridge 安装成功!'); } catch (err) { console.error('❌ 自动安装失败,请手动执行以下安装命令:'); if (isWin) { console.error(' irm https://cdn.kimi.com/webbridge/install.ps1 | iex'); } else { console.error(' curl -fsSL https://cdn.kimi.com/webbridge/install.sh | bash'); } return false; } } ``` The documentation also directs users to execute mutable remote content: ```bash curl -fsSL https://cdn.kimi.com/webbridge/install.sh | bash ``` ```powershell irm https://cdn.kimi.com/webbridge/install.ps1 | iex ``` ### Technical Analysis When WebBridge is absent, the crawler automatically downloads a shell or PowerShell script and immediately executes it. The downloaded content is not pinned to a version and is not authenticated through a published checksum or cryptographic signature. The user is not shown the payload or asked for confirmation before execution. The remote installer is not part of the reviewed project, so its effective behavior can change after this audit. Although the hostname appears associated with the declared Kimi dependency, hostname trust does not protect against server compromise, malicious deployment, DNS compromise, or a compromised TLS trust chain. Installing WebBridge may be necessary for the declared browser-control functionality, but downloading and directly executing mutable ...[truncated 975 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove automatic `curl | bash` and `irm | iex` execution. 2. Require the user to install WebBridge separately through a trusted package manager or signed release. 3. Pin an exact installer or binary version rather than retrieving a mutable endpoint. 4. Download the artifact to a local file and verify a published SHA-256 checksum and cryptographic signature before execution. 5. Display the source, version, destination, and requested actions, then require explicit user confirmation. 6. Run the installer with the lowest possible privileges and reject attempts to request unnecessary elevation. 7. Document how users can inspect, upgrade, and uninstall the dependency. ]]>
