T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:49- Finding
Unpinned Remote Repository Is Retrieved and Executed Locally
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 49–53
Vulnerability Type: Unpinned remote payload retrieval and execution
Risk Level: HighVulnerable Code:
bash git clone https://github.com/ryanfren/AgentCloak.git cd agentcloak pnpm install && pnpm build && pnpm devTechnical Analysis
The self-hosting instructions clone the mutable default branch of an external Git repository and immediately install, build, and run its contents. The instructions do not pin a reviewed commit hash or signed release and do not require integrity or signature verification.
Consequently, the code executed by a user can differ from the code that existed when this skill was audited. In addition,
pnpm installmay execute package lifecycle scripts, while the build and development commands execute repository-controlled scripts. These operations create a direct remote code execution channel if the upstream repository, maintainer account, release process, or dependency chain is compromised.Attack Path
- An attacker compromises the upstream repository, a maintainer account, or a dependency referenced by the project.
- The attacker modifies the default branch or dependency resolution to include a malicious lifecycle, build, or development script.
- A user follows the documented self-hosting procedure and clones the mutable default branch.
- The user runs
pnpm install,pnpm build, andpnpm dev. - The malicious code executes with the operating-system privileges and environment access of that user.
Impact Assessment
Successful exploitation can provide arbitrary code execution under the account performing installation. The malicious code could access files readable by that account, environment variables, email-service configuration, API keys, developer credentials, and network-accessible resources. If the commands are run by a privileged user or inside an overprivileged conta ...[truncated 221 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the cloned source to a specific, reviewed commit hash or cryptographically signed release.
- Publish the expected commit identifier and release checksum in the setup instructions.
- Require users to verify release signatures or checksums before installation.
- Use a committed lockfile and install with a frozen-lockfile option to prevent silent dependency resolution changes.
- Audit package lifecycle scripts and consider initially installing with lifecycle scripts disabled.
- Separate retrieval, verification, installation, build, and execution into distinct documented steps.
- Run the service as an unprivileged, dedicated account or in a hardened container with minimal filesystem, environment, and network access.
- Establish a reproducible release process so users can verify that distributed artifacts correspond to reviewed source.
