T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:215
- Finding
- Unpinned Python Dependencies Allow Supply-Chain Substitution## Vulnerability Details **File Location**: `SKILL.md:215` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```python # Requires: pip install pytesseract pdf2image ``` ### Technical Analysis The installation instruction retrieves `pytesseract` and `pdf2image` without fixed versions, package hashes, a lockfile, or an explicitly trusted package index. Dependency resolution can therefore select package releases that were not part of this audit. Python package installation and subsequent imports can execute package-controlled code. If a package publisher account, upstream release, package index, or dependency-resolution environment is compromised, following this instruction could introduce attacker-controlled code. No evidence was found that the currently named packages are malicious. The risk arises from the mutable and unverifiable dependency installation process. ### Attack Path 1. An attacker compromises a named dependency, one of its transitive dependencies, or the package distribution channel. 2. The attacker publishes a malicious release that remains compatible with the unpinned package name. 3. A user follows the documented `pip install pytesseract pdf2image` instruction. 4. `pip` resolves and installs the attacker-controlled release. 5. Malicious code executes during installation or when the dependency is imported and used for PDF processing. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running `pip` or the PDF-processing agent. Depending on those privileges, the attacker could read or modify accessible files, tamper with generated documents, access environment-held secrets, or establish further execution channels. The affected scope is the installation environment and resources available to that user; the audited repository itself contains no privilege-escalation mechanism.
- Remediation
- ## Remediation Suggestions - Declare all direct and transitive dependencies in a reviewed lockfile. - Pin exact versions rather than using unconstrained package names. - Record cryptographic hashes and install with a command such as `pip install --require-hashes -r requirements.txt`. - Configure an explicitly trusted package index and disable unexpected fallback indexes. - Run dependency installation and PDF processing in an isolated, least-privileged virtual environment or container. - Add automated dependency vulnerability and provenance checks to the release process. - Review and deliberately update the lockfile rather than resolving the newest available packages during installation.
