T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:18- Finding
Mutable Remote Installer Scripts Are Executed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18–27
Vulnerability Type: Remote payload retrieval and immediate execution
Risk Level: Criticalbash ```bash curl --proto '=https' --tlsv1.2 -fsSL \ https://github.com/lexmount/moli/releases/latest/download/moli-installer.sh | shOn Windows, use PowerShell:
powershell irm https://github.com/lexmount/moli/releases/latest/download/moli-installer.ps1 | iextext ### Technical Analysis The Skill instructs the agent to download installer scripts from an external GitHub release URL and pass their contents directly to a command interpreter. On Linux and macOS, the response is piped to `sh`; on Windows, `Invoke-RestMethod` is combined with `Invoke-Expression`. The `/releases/latest/` URL is mutable and does not identify an immutable release or artifact. Consequently, the code executed during a future invocation can differ from the code available during this audit. No checksum, digital signature, pinned version, local review step, or publisher-identity verification is required before execution. TLS options on the Unix command protect the network transport but do not establish that the remotely hosted script is safe or unchanged. If the repository, release process, hosting account, or installer artifact is compromised, the replacement payload will execute immediately. Installing the required `moli` executable is related to the declared CDP-server functionality. However, executing an unverified remote script is not the minimum-risk installation method. It gives externally controlled code all permissions available to the user running the agent. ### Attack Path 1. The agent attempts to resolve `moli` from `PATH` and finds that it is unavailable. 2. Following `SKILL.md`, it requests the mutable `latest` installer from the external repository. 3. An attacker who has compromised the repository, release pipeline, maintainer account, or hosted ...[truncated 1257 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | shandirm | iexinstallation patterns. - Pin installation to a specific, immutable Moli version rather than using
/releases/latest/. - Download the installer or binary to a local file without executing it automatically.
- Publish and verify a cryptographic checksum, such as SHA-256, obtained through a separately protected and version-pinned channel.
- Prefer a verifiable publisher signature in addition to a checksum, and fail closed if signature verification is unavailable or unsuccessful.
- Present the resolved version, source URL, destination, expected checksum, and requested changes to the user before requesting explicit approval to execute or install anything.
- Prefer a trusted operating-system package manager or another installation channel that provides package signing, version pinning, and auditable package metadata.
- Run installation with ordinary user privileges and avoid privilege elevation unless it is separately justified and explicitly approved.
- Document the files, directories, network access, and configuration changes made by the installer.
- After installation, verify the installed executable's integrity and run
moli --versiononly after all authenticity checks succeed.
- Remove the direct
