T08 · Insecure Dependencies
- Location
scripts/install-mcp.sh:32- Finding
Unpinned Third-Party Package Is Downloaded and Installed from PyPI
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install-mcp.sh, lines 32–34
Vulnerability Type: Supply-chain risk caused by an unpinned external dependency
Risk Level: Mediumbash # Install from PyPI echo "Running: pip install cmdb-compass" $PYTHON -m pip install --upgrade cmdb-compassTechnical Analysis
The installation script downloads and installs the latest available
cmdb-compasspackage from PyPI without pinning an audited version or verifying an integrity hash. The--upgradeoption further ensures that installation may select a newer release whose contents differ from the version originally reviewed.The downloaded package is not included in this project artifact. Consequently, its package installation hooks, transitive dependencies, runtime network behavior, credential handling, and ServiceNow operations cannot be verified through this audit. Python packages and their dependencies may execute code during installation or when the installed MCP module is launched.
This is a supply-chain exposure rather than evidence that the current PyPI package is malicious. Exploitation would require compromise of the package, its maintainer account, the package distribution channel, or one of its unresolved dependencies.
Attack Path
- A threat actor compromises the
cmdb-compassPyPI project, a maintainer account, the distribution path, or a dependency selected during installation. - The actor publishes a malicious or modified package release.
- Skill installation invokes
scripts/install-mcp.shthrough the executable installation declaration inSKILL.md. - The command
pip install --upgrade cmdb-compassretrieves the current package release and dependencies without a version lock or hash validation. - Malicious code executes during package installation or later when the MCP client starts
python -m servicenow_mcp.server. - At runtime, the server is configured to receive
SERVICENOW_INSTANCE_URL,SERVICENOW_USERNAME...[truncated 922 chars]
- A threat actor compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
cmdb-compassto a specific, audited version instead of selecting the latest release:bash "$PYTHON" -m pip install "cmdb-compass==<audited-version>" - Use a lock file containing hashes for the package and every transitive dependency, then require hash verification:
bash "$PYTHON" -m pip install --require-hashes -r requirements.lock - Remove
--upgradeso repeated installations cannot silently replace the reviewed version with a newer release. - Build and publish reproducible artifacts, document their expected SHA-256 hashes, and verify signatures or attestations before installation.
- Prefer including the auditable MCP server source in the reviewed project or installing from a cryptographically pinned source revision.
- Run the MCP server in an isolated virtual environment or container under a dedicated, unprivileged operating-system account.
- Provision a dedicated ServiceNow account with only the minimum roles and table permissions needed for the intended CMDB operations.
- Review and lock transitive dependencies, monitor package ownership and release changes, and repeat the security audit before updating the pinned version.
- Pin
