T03 · Remote Payload Retrieval and Execution
- Location
references/INSTALL.md:7- Finding
Unpinned Remote Repository Retrieval and Execution
- Content
View full analysis
Vulnerability Details
File Location:
references/INSTALL.md:7-14
Supporting Locations:commands/openui-install.md:6-8,references/TROUBLESHOOTING.md:5-10
Vulnerability Type: Mutable remote payload retrieval followed by npm lifecycle and build-script execution
Risk Level: MediumVulnerable Code
markdown 1. Clone the public repository: ```bash git clone https://github.com/xiaojiou176-open/openui-mcp-studio.git cd openui-mcp-studio npm install npm run buildtext ### Technical Analysis The installation procedure clones the current default branch of an external GitHub repository without selecting an immutable commit or verified release. It then executes `npm install` and `npm run build`. Because no commit hash, signed tag, checksum, or dependency integrity data is specified by this skill packet, the executable content can change after the packet has been reviewed. `npm install` may execute package lifecycle scripts, while `npm run build` explicitly runs repository-controlled code. The generated JavaScript is subsequently configured as a local MCP server. The external repository and its dependency graph were not included in the audited artifact. Therefore, this finding does not establish that the current remote code is malicious; it establishes that the instructions create an unpinned remote-code execution channel whose future payload cannot be determined from the reviewed files. ### Attack Path 1. An attacker compromises the external repository, its maintainer account, or one of its npm dependencies. 2. The attacker introduces malicious installation, lifecycle, or build code into the mutable version fetched by the documented command. 3. An operator follows the skill and clones the repository without pinning a reviewed commit. 4. `npm install` or `npm run build` executes the attacker-controlled code with the operator's privileges. 5. The resulting build output is registered as an MCP server and may continue to run wheneve ...[truncated 975 chars]- Remediation
View remediation
Remediation Suggestions
- Pin installation to a reviewed, immutable Git commit rather than the repository's current default branch:
bash git clone https://github.com/xiaojiou176-open/openui-mcp-studio.git cd openui-mcp-studio git checkout --detach REVIEWED_COMMIT_SHA- Publish a signed release and verify its signature or checksum before executing any repository code.
- Include and review a dependency lockfile, then use
npm ciinstead ofnpm install. - Review all npm lifecycle scripts and initially install with
npm ci --ignore-scriptswhere project requirements permit. - Run installation and build steps in a restricted container or sandbox without unrelated credentials or sensitive workspace access.
- Inspect and verify the generated MCP entry point before registering it with a host.
- Document the server's minimum filesystem and network permissions.
- Require explicit operator approval before updating the pinned commit or dependency lockfile.
