T08 · Insecure Dependencies
- Location
scripts/install_mph.py:42- Finding
Unpinned Third-Party Dependencies Installed from PyPI
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install_mph.py, lines 42–47
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code
python command = [ sys.executable, "-m", "pip", "install", "mph", "JPype1", "numpy", "scipy", "matplotlib", "--target", str(VENDOR_DIR), "--disable-pip-version-check", "--no-warn-script-location", ]Technical Analysis
The installation script retrieves five packages from pip without version constraints, package hashes, a lock file, or an explicitly configured trusted package index. Consequently, the code installed by this command can change between executions even when the Skill itself remains unchanged.
The packages and their transitive dependencies are placed in
vendor/site-packages. The Skill subsequently adds that directory toPYTHONPATHand imports packages from it. A compromised upstream release, dependency account takeover, malicious transitive dependency, or unexpected incompatible release could therefore introduce attacker-controlled code into the Skill's execution environment.This finding does not establish that any named package is currently malicious. It identifies an avoidable supply-chain exposure caused by unconstrained dependency resolution.
Attack Path
- An attacker compromises a listed package, one of its transitive dependencies, or the package distribution channel.
- The attacker publishes a malicious release that still satisfies the unconstrained package request.
- A user approves and runs
python scripts/install_mph.py. - pip resolves and installs the malicious release into
vendor/site-packages. - Malicious package code may execute during installation or when the Skill later imports the installed module.
- The payload runs with the privileges of the user executing the Skill.
Impact Assessment
Successful exploitation could provide arbitrary ...[truncated 543 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed, exact version, for example
package==x.y.z. - Generate and commit a lock file containing all transitive dependencies.
- Record approved distribution hashes and install with pip's
--require-hashesoption. - Use an explicitly configured, trusted package index or an internally controlled package mirror.
- Install from a reviewed requirements file rather than maintaining unconstrained package names directly in executable code.
- Add automated dependency vulnerability and provenance scanning to the release process.
- Test dependency updates in an isolated environment before updating approved versions and hashes.
- Preserve the existing requirement that dependency installation occurs only after explicit user approval.
- Pin every direct dependency to a reviewed, exact version, for example
