T08 · Insecure Dependencies
- Location
SKILL.md:192- Finding
Unpinned Dependencies Installed into the Active Python Environment
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 192
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code Snippet:
markdown 1. **Extract content** — Run `python scripts/extract-pptx.py <input.pptx> <output_dir>` (install python-pptx if needed: `pip install python-pptx`)Technical Analysis
The skill instructs the agent to install
python-pptxfrom the default Python package index without a version constraint, hash verification, lock file, isolated virtual environment, or explicit trusted index. A similar optional instruction for Pillow appears inhtml-template.md.Although the named packages are legitimate, an unpinned installation resolves to whichever release the package index considers current at execution time. Consequently, the effective dependency code can change after this skill has been audited. A compromised publisher account, malicious future release, package-index compromise, or compromised dependency in the transitive dependency graph could introduce attacker-controlled code.
Python packages can execute code during installation or when imported. The extractor subsequently imports the installed dependency with:
python from pptx import PresentationThe dependency therefore receives an execution opportunity under the identity and environment of the agent running the skill.
Attack Path
- An attacker compromises the upstream package, a transitive dependency, a publisher account, or the configured Python package index.
- The attacker publishes a malicious version that satisfies the unconstrained package request.
- A user asks the skill to convert a PowerPoint file on a system where
python-pptxis unavailable. - Following
SKILL.md, the agent runspip install python-pptx. - Pip selects and installs the attacker-controlled release into the active environment.
- Malicious installation hooks ...[truncated 916 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every dependency to an audited version, for example through a version-controlled requirements file.
-
Use hashes and require them during installation:
text python-pptx==AUDITED_VERSION --hash=sha256:EXPECTED_HASHbash python -m pip install --require-hashes -r requirements.txt -
Pin and hash transitive dependencies as well, using a reproducible lock-generation process.
-
Install dependencies inside a dedicated virtual environment rather than the user's global or shared Python environment.
-
Use
python -m piptied to the intended interpreter instead of an ambiguouspipexecutable. -
Configure an approved package index and disable unexpected additional indexes to reduce dependency-confusion exposure.
-
Apply the same controls to the Pillow installation documented in
html-template.md. -
Prefer a prebuilt, reviewed execution environment where dependencies are installed before the skill runs.
-
Document that dependency installation causes third-party code to execute and require confirmation before changing the environment.
-
