T08 · Insecure Dependencies
- Location
scripts/md2docx-spec.md:20- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/md2docx-spec.md:20-23; also referenced inSKILL.md:45-49andSKILL.md:681-688
Vulnerability Type: Uncontrolled third-party dependency installation
Risk Level: MediumVulnerable Code
markdown ## Environment Requirements - Python 3.8+ - `python-docx` library — install with: `pip install python-docx` - No other third-party packagesThe main Skill instructions similarly direct users to run:
markdown 3. Install python-docx: `pip install python-docx`Technical Analysis
The installation command does not constrain
python-docxto a reviewed version and does not verify a package hash. Consequently, the effective dependency can change after the Skill has been audited.Package installation may execute package build or installation logic with the privileges of the user running
pip. If a future package release, package-index account, distribution artifact, or dependency in the resolved dependency graph is compromised, following these instructions could execute unreviewed code locally. Even without a compromise, uncontrolled version drift can introduce incompatible or newly vulnerable code and make the pipeline non-reproducible.This is a supply-chain weakness rather than evidence that the current
python-docxpackage is malicious.Attack Path
- An attacker compromises a future
python-docxrelease, its package-index account, a resolved transitive dependency, or the package distribution path. - A user follows the Skill’s first-time setup instructions.
pip install python-docxresolves the current uncontrolled release rather than a previously reviewed artifact.- Malicious package installation or import-time code executes in the user’s environment.
- That code operates with the filesystem, network, environment-variable, and process privileges available to the installing or pipeline user.
Impact Assessment
...[truncated 608 chars]
- An attacker compromises a future
- Remediation
View remediation
Remediation Suggestions
-
Pin
python-docxto a specific, reviewed version. -
Maintain a locked requirements file with hashes, such as a hash-validated
requirements.txt. -
Install with hash enforcement:
bash python3 -m pip install --require-hashes -r requirements.txt -
Record the trusted package index explicitly and avoid untrusted extra indexes.
-
Install the dependency inside a dedicated virtual environment rather than globally.
-
Run installation and document conversion as an unprivileged account with access only to the required input and output directories.
-
Periodically review dependency advisories and update the pin only after testing and artifact verification.
-
