T08 · Insecure Dependencies
- Location
scripts/tts.py:13- Finding
Automatic Installation of Unpinned Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
scripts/tts.py:13-27
Vulnerability Type: Automatic installation of unpinned third-party packages
Risk Level: HighEvidence
python def install_dependencies(): try: import ChatTTS import torch import torchaudio return True except ImportError: os.system("pip install ChatTTS torch torchaudio -q") try: import ChatTTS return True except ImportError: return FalseThe same unpinned installation command is also documented at
SKILL.md:57-61:bash pip install ChatTTS torch torchaudioTechnical Analysis
The application automatically invokes
pipduring normal execution when a required module is unavailable. The packages are specified only by name, without pinned versions, cryptographic hashes, a lockfile, or a reviewed package index.Python package installation can execute package-controlled build and installation logic. Consequently, a compromised package release, dependency-confusion condition, malicious transitive dependency, or compromised package repository could result in arbitrary code execution before speech generation begins.
Automatic installation also prevents the user from reviewing dependency changes before they are introduced into the runtime environment. The use of
os.systemis not directly command-injectable here because the command is a constant string, but it still launches a shell and delegates trust to the activepipexecutable and package index configuration.Attack Path
- An attacker compromises one of the named packages, one of its transitive dependencies, or the package repository serving it.
- The attacker publishes a malicious version or installation artifact.
- A user invokes
scripts/tts.pyin an environment where at least one required module is missing. install_dependencies()auto ...[truncated 906 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove automatic dependency installation from the runtime execution path.
- Provide a separate, explicit installation procedure that requires user confirmation.
- Pin every direct and transitive dependency to a reviewed version in a lockfile.
- Require package hashes, such as through
pip install --require-hashes -r requirements.txt. - Use a dedicated virtual environment with minimal permissions.
- Configure an approved package index explicitly and disable unintended extra indexes to reduce dependency-confusion risk.
- Scan and review dependency updates before changing pinned versions.
- Invoke
pipthrough the active interpreter, such aspython -m pip, during the controlled setup phase rather than usingos.system.
