T08 · Insecure Dependencies
- Location
SKILL.md:66- Finding
Unpinned Third-Party MCP Server Is Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 66–75
Vulnerability Type: Unpinned remote dependency execution
Risk Level: HighVulnerable Code
json { "mcpServers": { "lemgen": { "command": "npx", "args": ["-y", "github:aithink001/lemgen-ai-design-mcp"], "env": { "LEMGEN_API_TOKEN": "sk_..." } } } }Technical Analysis
The recommended configuration invokes
npx -yagainst a mutable GitHub repository reference. It does not pin the MCP server to an audited commit SHA or immutable package version, nor does it specify an integrity checksum.Consequently, the code executed when a user follows these instructions can differ from the code that existed when this skill was reviewed. The
-yoption suppresses the interactive installation confirmation, making retrieval and execution automatic. The downloaded MCP process is also supplied withLEMGEN_API_TOKEN, placing that credential within the trust boundary of code that is absent from this project and cannot be audited here.This is a supply-chain weakness rather than proof that the current upstream repository is malicious.
Attack Path
- An attacker compromises the referenced GitHub repository, a maintainer account, or another part of its software supply chain.
- The attacker changes the repository's default revision to include a malicious installation hook or MCP server payload.
- A user copies the documented configuration and starts the MCP host.
npx -yretrieves and executes the current attacker-controlled revision without requesting installation confirmation.- The payload runs with the permissions of the MCP host process.
- Because
LEMGEN_API_TOKENis injected into the process environment, the payload can read and misuse or disclose that token. - Subject to the host's operating-system permissions and network controls, the payload could access other files, credentials, or network resources available to that pro ...[truncated 634 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed, immutable full commit SHA rather than a repository's mutable default revision.
- Prefer a versioned release artifact with a verified cryptographic integrity hash and documented provenance.
- Remove
-ywhere practical so installation or source changes do not proceed without operator review. - Vendor or otherwise inspect the exact MCP implementation before deployment, including package lifecycle hooks and transitive dependencies.
- Run the MCP server in a sandbox or container with a read-only filesystem, minimal host mounts, restricted outbound networking, and a dedicated unprivileged account.
- Use a narrowly scoped, revocable LemGen token and rotate it if compromise is suspected.
- Add dependency update controls so each upstream revision requires explicit security review before deployment.
- Document the exact reviewed source revision and an integrity-verification procedure in the setup instructions.
