T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 8
Vulnerability Type: Unpinned third-party dependency
Risk Level: Mediumyaml dependencies: "pip install python-docx"Technical Analysis
The Skill instructs users or agents to install
python-docxwithout specifying a reviewed version or validating the package with a cryptographic hash. Consequently, the installed artifact is mutable and depends on whichever release the package index resolves at installation time.Although no malicious dependency is currently demonstrated in the repository, this practice creates a supply-chain exposure. A compromised maintainer account, malicious future release, or compromise of the package distribution infrastructure could cause installation of attacker-controlled code. Python packages may execute code during installation, and malicious package content may also execute when imported during document generation.
Attack Path
- An attacker compromises the upstream package, a maintainer account, or the package distribution channel.
- The attacker publishes a malicious release under the expected
python-docxpackage name. - A user or agent follows the Skill metadata and runs
pip install python-docx. - Because no version or hash is specified, pip resolves and downloads the attacker-controlled release.
- Malicious code executes during installation or when the package is imported by the document-generation code.
- The code operates with the privileges of the account running pip or invoking the Skill.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the installing or executing user's privileges. Depending on that account's permissions, an attacker could access local files, environment variables, generated marketing documents, and credentials available to the process; modify files; or establish outbound network connections. The immediate scope is the environment ...[truncated 204 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the mutable installation command with a dependency manifest that pins a reviewed, exact version.
- Record and enforce cryptographic hashes for every downloaded distribution, for example through a hash-locked
requirements.txtinstalled withpip install --require-hashes -r requirements.txt. - Prefer binary wheels from the official Python Package Index and explicitly disable unexpected package sources or extra indexes.
- Install the dependency in an isolated virtual environment with the minimum required operating-system permissions.
- Use automated dependency scanning and a controlled update process to review new versions before changing the pin.
- Consider the following pattern after selecting and verifying an appropriate release:
text python-docx==<reviewed-version> --hash=sha256:<verified-distribution-hash>The exact version and hash should be generated from a trusted artifact and maintained through the project's dependency-review process.
