T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: Unpinned and unverifiable third-party dependency **Risk Level**: Medium ```markdown - Python + **pywin32** (`python -m pip install pywin32`). ``` ### Technical Analysis The setup documentation instructs users to install `pywin32` without specifying a reviewed version, cryptographic hash, trusted package index, or lock file. Consequently, the installed dependency may change over time and may be obtained from a package source configured outside the project's control. The project does not automatically execute this installation command, and no malicious dependency is present in the audited files. Nevertheless, if the package registry, a configured package mirror, or a future dependency release is compromised, following the documented command could install and execute attacker-controlled package code. ### Attack Path 1. An attacker compromises the relevant package release, package registry, or Python package mirror used by the victim. 2. The user follows the documented setup instruction and runs `python -m pip install pywin32`. 3. Pip resolves the dependency from the compromised source without enforcing an audited version or expected artifact hash. 4. Malicious installation or runtime code executes with the privileges of the user running pip. 5. The attacker may access or modify resources available to that user, subject to operating-system controls. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the account performing the installation. The resulting scope may include that user's files, accessible presentations, Python environment, and other resources available to the account. Administrative or system-level impact would require the installation to be run from an elevated context; the audited project itself does not request or obtain elevation.
- Remediation
- ## Remediation Suggestions 1. Pin `pywin32` to a specifically reviewed version instead of installing the latest available release. 2. Store dependencies in a version-controlled requirements or lock file. 3. Record and enforce cryptographic hashes with pip's `--require-hashes` option. 4. Use an explicitly configured, trusted package index and disable unintended fallback indexes where appropriate. 5. Review and update the pinned dependency through a controlled dependency-update process. 6. Prefer installation in an isolated virtual environment under a non-administrative account. Example hardened installation pattern: ```text pywin32==<reviewed-version> --hash=sha256:<verified-artifact-hash> ``` ```bash python -m pip install --require-hashes --index-url https://pypi.org/simple -r requirements.txt ```
