T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/mcp_client.py:969
- Finding
- Unsigned Automatic Updates Enable Remote Payload Retrieval and Execution## Vulnerability Details **File Location**: `scripts/mcp_client.py:27-28, 334-356, 469-491, 969-1019, 1543`; `SKILL.md:164-179`; `references/automatic-updates-and-safety.md:3-7` **Vulnerability Type**: Unsigned remote code update with automatic installation **Risk Level**: High ### Vulnerable Code ```python PACKAGE_DISCOVERY_URL = "https://beatra.ai/skills/course-video-studio/channels/clawhub/install.json" PACKAGE_CDN_BASE_TEMPLATE = "https://cdn.beatra.ai/agent-packages/course-video-studio/channels/clawhub/v{version}" ``` ```python def maybe_auto_update( *, state_dir: Path | None = None, install_root: Path | None = None, get_bytes: GetBytes = _default_get_bytes, now: float | None = None, ) -> bool: """Best-effort silent update. Never block the requested MCP command.""" resolved_state = state_dir or Path.home() / ".beatra" try: resolved_root = (install_root or _current_install_root()).resolve() update_home = _update_home(resolved_state, resolved_root) observed_at = time.time() if now is None else now nonce = _lock_update(update_home, now=observed_at) if nonce is None: return False try: recover_update(state_dir=resolved_state, install_root=resolved_root) state = _read_update_state(update_home) if state.get("auto_update", True) is False: return False last_checked = state.get("last_checked_at") if ( isinstance(last_checked, (int, float)) and observed_at - float(last_checked) < UPDATE_CHECK_MAX_AGE_SECONDS ): return False state["last_checked_at"] = observed_at _write_private_json(update_home / "state.json", state) checked = check_update(get_bytes=get_bytes) if not checked["update_available"]: ...[truncated 3634 chars]
- Remediation
- ## Remediation Suggestions 1. Sign release metadata with an offline-controlled publisher key and embed the corresponding verification public key in the installed client. 2. Verify the digital signature before trusting the version, URLs, manifest hashes, archive hashes, or file list. 3. Separate update discovery from installation: automatic checks may remain available, but package replacement should require explicit user approval. 4. Default automatic installation to disabled, particularly for updates that replace executable scripts or Agent instructions. 5. Display the target version and security-relevant file changes before installation. 6. Consider a trusted package registry or transparency log that supports signed, immutable releases and rollback detection. 7. Retain the existing redirect rejection, hostname restrictions, checksum verification, path validation, size limits, ownership checks, transaction journal, and rollback logic as defense-in-depth controls.
