T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 14
Vulnerability Type: Unpinned dependency installation from the configured Python package index
Risk Level: MediumComplete Code Snippet:
markdown - `pywin32`. If missing and local package installation is acceptable, run `py -3 -m pip install --user pywin32`.Technical Analysis
The documented installation command requests
pywin32without specifying a reviewed version or validating the downloaded artifact with a cryptographic hash. Consequently, the actual package installed depends on the state of the configured Python package index at installation time.If the package source, index configuration, distribution account, or delivery channel is compromised, a user following this instruction could install attacker-controlled code. Python packages may execute installation or build logic, and their imported modules subsequently execute with the privileges of the invoking user.
This finding is limited to dependency integrity. The audited project does not itself retrieve remote payloads, execute shell commands, establish persistence, or collect credentials.
Attack Path
- An attacker compromises the package distribution channel, a package publisher account, or the Python index configured on the target system.
- The attacker makes a malicious
pywin32artifact available as the version selected by the unpinned command. - A user follows the documented command:
py -3 -m pip install --user pywin32. - Pip downloads and installs the attacker-controlled artifact without checking a project-specified version or hash.
- Malicious installation logic or imported package code executes under the invoking user's account.
Exploitation therefore requires control of, or successful redirection of, the dependency supply channel used by the target.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the ...[truncated 418 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
pywin32to a specifically reviewed version instead of resolving the latest available release. - Store dependency declarations in a locked requirements file and include cryptographic hashes for every accepted distribution.
- Install with hash verification, for example:
text py -3 -m pip install --require-hashes -r requirements.txt - Generate hashes from artifacts obtained through a trusted release process and review updates before changing the lock file.
- Where organizational policy permits, specify an approved package index and prevent fallback to untrusted or dependency-confusion-prone sources.
- Prefer a managed virtual environment over modification of the user's general Python package environment.
- Document that users should verify the configured pip index and avoid installing the dependency when package-source integrity cannot be established.
- Pin
