T08 · Insecure Dependencies
- Location
SKILL.md:44- Finding
Unpinned npm Dependency Automatically Downloads and Executes Mutable Remote Code
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 44-45
Vulnerability Type:T08: Insecure Dependencies
Risk Level: HighVulnerable Code
json "command": "npx", "args": ["-y", "mcp-remote@latest", "https://gateway.pipeworx.io/airquality/mcp"]Technical Analysis
The documented MCP configuration invokes
npxwith the-yoption to automatically download and executemcp-remote@latest. Thelatestnpm tag is mutable, so the package version and effective executable code can change after this skill has been reviewed.Because no exact version, lockfile, or package integrity hash is specified, users cannot reliably reproduce or verify the audited dependency. Automatic confirmation through
-yfurther removes an opportunity to inspect the package before execution. This creates a supply-chain risk if the package, its publishing account, its dependencies, or the npm distribution channel is compromised.Attack Path
- An attacker compromises the
mcp-remotepackage, a transitive dependency, or an authorized npm publisher account. - The attacker publishes a malicious release and assigns it to the mutable
latesttag. - A user initializes the MCP server using the configuration in
SKILL.md. npx -yretrieves the current package associated withmcp-remote@latestwithout interactive confirmation.- The downloaded package executes locally with the permissions and environment of the user running the MCP client.
- The malicious package can access resources available to that process and perform unauthorized actions within those privileges.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the MCP client's user privileges. Depending on the execution environment, exposed resources could include readable local files, environment variables, application credentials, network-accessible services, and other agent-accessible resources.
The precise scope is limited by the operating-sys ...[truncated 313 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
mcp-remote@latestwith an exact, reviewed version such asmcp-remote@X.Y.Z. - Install the dependency during a controlled deployment step rather than downloading and executing it dynamically whenever the MCP server starts.
- Use a lockfile and npm integrity metadata to make dependency resolution reproducible and detect package tampering.
- Remove automatic approval through
npx -y, or configure the environment so only preinstalled and explicitly approved packages can run. - Mirror approved packages in a controlled registry and enforce registry allowlisting where feasible.
- Audit the package and its transitive dependencies before upgrades, and use automated dependency monitoring for publisher changes, malicious releases, and known vulnerabilities.
- Run the MCP client under a dedicated, least-privileged account or sandbox with restricted filesystem, environment-variable, credential, and network access.
- Establish an explicit update process requiring security review before changing the pinned dependency version.
- Replace
