T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned npm Packages Are Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 19; the same unsafe pattern is repeated on lines 24, 32, 37, and throughout the workflow examples.
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: HighVulnerable Code:
bash npx -y mcporter list --stdio "npx -y alibabacloud-devops-mcp-server" --schemaTechnical Analysis
The documented command uses
npx -yto download and immediately executemcporterandalibabacloud-devops-mcp-serverwithout specifying exact versions. The project contains no lockfile, integrity hash, vendored source, or other mechanism that constrains which package contents will execute.Because the
-yoption automatically accepts package installation, following the documented instructions can execute whatever package version the npm registry resolves at that time. The effective executable payload can therefore change after this Skill has been reviewed.This is especially sensitive because the nested MCP server is intended to receive
YUNXIAO_ACCESS_TOKENand expose operations that can modify repositories, execute pipelines, manage deployments, alter variables, and delete resources.Attack Path
- An attacker compromises the npm publisher account, package registry path, or a future package release.
- The attacker publishes altered code under either package name.
- A user or agent follows the Skill instructions and invokes the unpinned
npx -ycommand. - npm downloads and executes the attacker-controlled release without an interactive confirmation.
- The malicious package reads accessible credentials, including the Yunxiao token when configured.
- The package exfiltrates credentials or directly invokes DevOps operations using the victim's privileges.
Impact Assessment
Successful exploitation provides arbitrary code execution under the account running
npx. Local files, environment variables, process-accessible creden ...[truncated 469 chars]- Remediation
View remediation
Remediation Suggestions
- Pin both packages to exact, reviewed versions, for example
mcporter@X.Y.Zandalibabacloud-devops-mcp-server@A.B.C. - Install dependencies through a committed lockfile using a reproducible command such as
npm ci. - Verify package integrity through lockfile integrity values, trusted provenance, signatures, or independently recorded checksums.
- Document the expected package publisher and source repository so package identity can be verified before installation.
- Avoid runtime installation for production or privileged use. Prefer a reviewed, prebuilt artifact or vendored dependency set.
- Run the MCP server in a restricted container or sandbox with minimal filesystem and network access.
- Supply a short-lived, least-privilege token that permits only the operations required for the current task.
- Apply the pinned-version pattern to every repeated
npxcommand inSKILL.md.
- Pin both packages to exact, reviewed versions, for example
