T08 · Insecure Dependencies
- Location
adapters/codex/SKILL.md:83- Finding
Unpinned MCP Packages Are Downloaded and Executed with Sensitive Account Access
- Content
View full analysis
Vulnerability Details
File Location:
adapters/codex/SKILL.md:83-87andadapters/codex/SKILL.md:106-111
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
toml [mcp_servers.telegram] command = "npx" args = ["-y", "mcp-telegram"] env = { TELEGRAM_API_ID = "your_api_id", TELEGRAM_API_HASH = "your_api_hash" } enabled = truetoml [mcp_servers.email] command = "npx" args = ["-y", "@kembec/email-mcp"] enabled = trueTechnical Analysis
The recommended configurations use
npx -yto retrieve and execute mutable packages without specifying a reviewed version or integrity hash. The-yoption suppresses the normal installation prompt, while the absence of a version allows the package registry's current release to determine which code runs.These dependencies operate in sensitive trust contexts. The Telegram MCP server receives Telegram API credentials and connects through a real Telegram user account. The email MCP server can receive OAuth authorization for an email account. Consequently, compromise of the package, its publisher, its transitive dependencies, or the registry delivery path could place attacker-controlled code inside an authenticated agent process.
Attack Path
- The user chooses the MCP-based integration strategy.
- The agent or user adds the documented MCP configuration to
~/.codex/config.toml. - A package publisher account, package release, transitive dependency, or registry distribution path is compromised.
- A later MCP invocation runs
npx -yand downloads the current compromised release. - The package executes locally with access to the environment and the authorization supplied to the MCP server.
- Malicious code can capture Telegram credentials, misuse an authenticated account, inspect accessible messages, or abuse email authorization.
Impact Assessment
A compromised Telegram depen ...[truncated 622 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every package to a specifically reviewed version, such as
mcp-telegram@x.y.zand@kembec/email-mcp@x.y.z. - Use a lockfile or equivalent integrity mechanism that verifies package hashes and transitive dependencies.
- Verify package publisher identity, source repository provenance, release signatures, and maintenance history before recommending installation.
- Remove automatic
-yexecution where practical so installation remains an explicit user-approved operation. - Install dependencies in an isolated environment with restricted filesystem, environment-variable, and network access.
- Do not expose credentials to the general agent environment. Pass them only to the reviewed integration process through an appropriate secret manager.
- Establish an update-review process rather than automatically consuming the latest package release.
- Pin every package to a specifically reviewed version, such as
