T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:215
- Finding
- Unpinned Third-Party Package Installation## Vulnerability Details **File Location**: `SKILL.md`, line 215 **Vulnerability Type**: Uncontrolled third-party dependency versions **Risk Level**: Medium ### Vulnerable Code ```python # Requires: pip install pytesseract pdf2image ``` ### Technical Analysis The Skill instructs users to install `pytesseract` and `pdf2image` without pinning reviewed versions or verifying package hashes. It also does not provide a lock file or explicitly identify a trusted package index. Consequently, the installed code may vary over time. If one of these packages or its dependency chain is compromised, a user following the instruction could install attacker-controlled code. Python packages can execute code during installation or when subsequently imported by the OCR example. This finding concerns unsafe dependency acquisition guidance; the audit found no evidence that either named package is currently malicious. ### Attack Path 1. An attacker compromises a named package, one of its transitive dependencies, or the package distribution channel. 2. A user follows the instruction and runs the unpinned `pip install` command. 3. The package resolver selects an attacker-controlled or compromised release because no approved version or hash is enforced. 4. Malicious package code executes during installation or when the OCR workflow imports the package. 5. The payload operates with the privileges and environment access of the user running Python or `pip`. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the installing user's account. The resulting access could include reading or altering files available to that user, accessing environment variables and local credentials, and processing or exfiltrating sensitive PDF content. The scope would ordinarily be limited to the user's permissions unless the installation is performed with elevated privileges.
- Remediation
- ## Remediation Suggestions - Pin every direct and transitive dependency to a reviewed version. - Store dependency constraints in a version-controlled lock or requirements file. - Require cryptographic hashes during installation, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` - Generate `requirements.txt` with exact versions and SHA-256 hashes for all resolved distributions. - Use an explicitly configured, trusted package index or an internally controlled package mirror. - Perform installation in a dedicated virtual environment without administrative privileges. - Routinely scan dependencies for known vulnerabilities and review updates before changing pinned versions. - Consider documenting OS-level dependencies required by OCR and PDF conversion tools so users do not obtain binaries from unverified sources.
