T08 · Insecure Dependencies
- Location
install/codex-cli.md:10- Finding
Unpinned Third-Party Package Is Downloaded and Executed Automatically
- Content
View full analysis
Vulnerability Details
File Location:
install/codex-cli.md, lines 10–13
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Mediumtoml [mcp_servers.justfix-estimator] command = "npx" args = ["-y", "mcp-remote@latest", "https://estimator-mcp.justfix.app/mcp"]Technical Analysis
The recommended Codex CLI configuration invokes
npxwith both-yandmcp-remote@latest. This causes the current package version selected by the npmlatesttag to be downloaded and executed without interactive confirmation whenever the MCP process is launched.Because
latestis mutable, the code executed by users can change after this Skill has been reviewed. The repository therefore does not provide a reproducible or reviewable dependency version. If the package publisher, npm account, package distribution process, or a future release is compromised, arbitrary code could execute under the account running Codex.This is a supply-chain vulnerability rather than evidence that the current
mcp-remotepackage is malicious.Attack Path
- An attacker compromises the
mcp-remotepackage, its maintainer account, or its release process. - The attacker publishes a malicious version and assigns it to the npm
latesttag. - A user follows the documented configuration and starts Codex CLI.
- Codex launches the configured MCP command.
npx -y mcp-remote@latestretrieves the attacker-controlled release without requesting confirmation.- The malicious package executes locally with the privileges and environment of the Codex process.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the permissions of the user running Codex. Depending on that account's environment and filesystem access, an attacker could potentially:
- Read or modify files accessible to the user, including source repositories.
- Access environment variables and credentials exposed to the Codex process.
- Make outbou ...[truncated 322 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
mcp-remote@latestwith an exact, reviewed version:toml [mcp_servers.justfix-estimator] command = "npx" args = ["-y", "mcp-remote@<audited-exact-version>", "https://estimator-mcp.justfix.app/mcp"] - Record and review dependency updates instead of following the mutable
latesttag automatically. - Prefer a locally installed dependency governed by a lockfile so the resolved version and transitive dependency graph are reproducible.
- Where supported, verify package integrity using a trusted checksum or registry integrity metadata.
- Run the MCP proxy with least privilege and prevent unnecessary access to sensitive repositories, credentials, and environment variables.
- Document the package's provenance and a controlled update procedure that includes release-note review and security testing.
- Replace
