T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:160
- Finding
- Unpinned Third-Party Python Package Installation## Vulnerability Details **File Location**: `SKILL.md`, line 160 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash pip install mcp-midjourney ``` ### Technical Analysis The documentation directs users to install `mcp-midjourney` from pip's configured package index without specifying a reviewed version, cryptographic hashes, a lockfile, or a verified source. Consequently, installation behavior and installed code can change after the Skill has been audited. This supply-chain weakness could become exploitable if the package, its publisher account, the configured package index, or a transitive dependency is compromised. A malicious package release may execute code during installation through build hooks or later when the package is imported or run. The available evidence does not establish that the named package is currently malicious; the finding concerns the unsafe, non-reproducible installation instruction. ### Attack Path 1. An attacker compromises the package publisher, a transitive dependency, or a package index trusted by the user's pip configuration. 2. The attacker publishes a malicious release under the expected package name or dependency chain. 3. A user follows the documented `pip install mcp-midjourney` instruction. 4. Pip resolves the uncontrolled release and downloads it without validating a project-provided version or hash. 5. Attacker-controlled code executes during package building or installation, or when the installed MCP server is subsequently started. 6. The code operates with the privileges and environmental access of the installing or executing user. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the user account that installs or runs the package. The resulting access may include project files, user-accessible files, environment variables such as `ACEDATACLOUD_API_TOKEN`, and network resources available to that account. If installati ...[truncated 205 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to a specifically reviewed version rather than installing the latest available release. - Record and validate cryptographic hashes using a locked requirements file and `pip install --require-hashes -r requirements.txt`. - Pin and audit all transitive dependencies, not only the top-level package. - Document the verified publisher and canonical source repository. - Install the package in an isolated virtual environment under a non-privileged account. - Avoid `sudo pip install` and prevent the runtime from accessing secrets or files it does not require. - Use a trusted internal package mirror or allowlist where practical. - Add automated dependency scanning and periodically review pinned upgrades before adoption. A hardened example is: ```bash python -m venv .venv . .venv/bin/activate pip install --require-hashes -r requirements.txt ``` The corresponding `requirements.txt` should contain an exact reviewed version and hashes for every resolved artifact.
