T03 · Remote Payload Retrieval and Execution
- Location
- SKILL.md:49
- Finding
- Unauthenticated Remote Archive Retrieval Followed by Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:49-52` **Vulnerability Type**: Unauthenticated remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -L -o <SKILL_DIR>/../awiki-agent-id-message.zip http://awiki.info/static-files/awiki-agent-id-message.zip unzip -o <SKILL_DIR>/../awiki-agent-id-message.zip -d "$(dirname <SKILL_DIR>)" cd <SKILL_DIR> && python install_dependencies.py rm -f <SKILL_DIR>/../awiki-agent-id-message.zip ``` ### Technical Analysis The recommended installation procedure downloads an executable Skill archive over plaintext HTTP. The procedure does not verify a digital signature, cryptographic checksum, pinned release identifier, or trusted certificate before extracting the archive and executing its `install_dependencies.py` script. Because HTTP provides neither server authentication nor transport integrity, an attacker positioned on the network path can replace or modify the archive. The same risk applies if the download server or its DNS records are compromised. The downloaded origin, `awiki.info`, also differs from the `awiki.ai` origin identified elsewhere as the canonical service. The extracted Python script imports additional project modules during installation, including database migration code. Consequently, modifying either `install_dependencies.py` or one of its imported modules is sufficient to execute attacker-controlled Python code. ### Attack Path 1. A user or Agent follows the recommended ZIP installation instructions. 2. The archive request is sent to `http://awiki.info/...` without TLS. 3. A network-positioned attacker, compromised proxy, malicious access point, DNS attacker, or compromised download server returns a modified ZIP archive. 4. The command extracts the unverified archive into the Skill installation area. 5. The procedure immediately executes `python install_dependencies.py`. 6. Attacker-controlled Python code runs with the privileges of the user ...[truncated 627 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the plaintext HTTP installation option. 2. Distribute releases exclusively over HTTPS from a canonical, documented origin. 3. Publish a SHA-256 digest through an independently authenticated channel and verify it before extraction. 4. Prefer cryptographically signed release artifacts and validate the signature against a pinned publisher key. 5. Pin the downloaded artifact to a specific immutable release rather than a mutable filename. 6. Extract into a newly created temporary directory and validate every archive member before installation. 7. Reject absolute paths, `..` traversal components, device files, and unsafe symbolic links in the archive. 8. Display the verified version and require explicit approval before executing any downloaded script. 9. Prefer a pinned Git commit or signed Git tag when installing from the source repository. ]]>
