T08 · Insecure Dependencies
- Location
SKILL.md:187- Finding
Unpinned Third-Party Package Execution via npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 187
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
bash codex mcp add github -- npx @anthropic/mcp-server-githubTechnical Analysis
The documented command uses
npxto resolve and execute@anthropic/mcp-server-githubwithout specifying an exact version or verifying package integrity. The package version selected from the registry can therefore change after the Skill has been reviewed.Because the package is registered as an MCP server, its code executes locally under the permissions of the user running Codex and may receive access to tools, environment variables, repository content, or network resources made available to that process. Although the package name appears intentional and there is no evidence that its current contents are malicious, mutable dependency resolution creates a supply-chain exposure.
Attack Path
- An attacker compromises the package, its publisher account, or the package-distribution path.
- The attacker publishes a malicious or compromised version under the same package name.
- A user follows the documented command without an explicit version.
npxresolves and executes the mutable package version from the registry.- The package starts as an MCP server under the invoking user's identity.
- Malicious code accesses repository data, credentials, environment variables, filesystem resources, or network services available to the process.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the invoking user's privileges. The accessible scope depends on Codex sandboxing and process isolation, but it may include source repositories, local files, authentication material exposed through the environment, and network-accessible services. Integration as an MCP server can also expose data exchanged through MCP operations.
...[truncated 136 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the package to a reviewed exact version, for example
@anthropic/mcp-server-github@X.Y.Z. - Install it through a lockfile-controlled dependency workflow rather than resolving a mutable version during execution.
- Verify package provenance, publisher identity, integrity hashes, and signatures where supported.
- Review package updates before changing the pinned version.
- Run the MCP server with minimum necessary filesystem, environment, tool, and network access.
- Avoid exposing unrelated credentials or sensitive environment variables to the MCP process.
- Document the expected package source and approved version so operators can verify them before installation.
- Pin the package to a reviewed exact version, for example
