T03 · Remote Payload Retrieval and Execution
- Location
README.md:20- Finding
Unpinned Remote MCP Server Code Is Retrieved and Executed
- Content
View full analysis
Vulnerability Details
File Location:
README.md:20-49
Vulnerability Type: Remote execution of mutable upstream code
Risk Level: MediumThe documented installation alternatives retrieve and execute an MCP server from mutable external references:
json { "mcpServers": { "mcp-local-rag": { "command": "uvx", "args": [ "--python=3.10", "--from", "git+https://github.com/nkapila6/mcp-local-rag", "mcp-local-rag" ] } } }json { "mcpServers": { "mcp-local-rag": { "command": "docker", "args": [ "run", "--rm", "-i", "--init", "-e", "DOCKER_CONTAINER=true", "ghcr.io/nkapila6/mcp-local-rag:v1.0.2" ] } } }Technical Analysis
The
uvxconfiguration installs directly from a Git repository without specifying a reviewed commit SHA. The effective code therefore depends on the repository state when installation occurs and can change after this skill has been audited.The Docker alternative uses the tag
v1.0.2without an immutable image digest. Container tags can potentially be reassigned to different image manifests. Consequently, the displayed version label does not cryptographically ensure that future users execute the same image reviewed by earlier users.In both cases, the MCP client is instructed to execute remotely supplied software. Compromise of the upstream repository, publisher account, build pipeline, or container registry could replace the expected server with an attacker-controlled payload.
Attack Path
- An attacker compromises the upstream Git repository, maintainer credentials, release pipeline, or container registry.
- For the
uvxpath, the attacker changes the repository revision resolved by the unpinned Git URL. For the Docker path, the attacker replaces the manifest associated withv1.0.2. - A user follows the docu ...[truncated 1124 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the Git installation to a reviewed full commit SHA rather than the repository's current default revision, for example:
text git+https://github.com/nkapila6/mcp-local-rag@FULL_REVIEWED_COMMIT_SHA - Pin the container image by its immutable digest:
text ghcr.io/nkapila6/mcp-local-rag:v1.0.2@sha256:VERIFIED_IMAGE_DIGEST - Verify commit signatures, release provenance, and image signatures before publishing updated installation instructions.
- Introduce a documented update process requiring review and testing before changing either pinned reference.
- Run the MCP server with least privilege. Restrict filesystem access, credentials, environment variables, and outbound network access to what search functionality requires.
- Configure dependency and image monitoring so maintainers can deliberately update pins when validated security releases become available.
- Pin the Git installation to a reviewed full commit SHA rather than the repository's current default revision, for example:
