T08 · Insecure Dependencies
- Location
SKILL.md:235- Finding
Unpinned Third-Party OCR Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:235
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code
python # Requires: pip install pytesseract pdf2imageTechnical Analysis
The OCR example instructs users to install
pytesseractandpdf2imagewithout version constraints, package hashes, a lockfile, or an explicitly trusted package index. Dependency resolution therefore retrieves mutable artifacts from the user's configured Python package source.This is a supply-chain weakness rather than evidence that the named packages are malicious. If a dependency release or configured package source is compromised, following the instruction could install attacker-controlled code. Such code may execute during package installation or when the installed module is imported by the OCR workflow.
Attack Path
- An attacker compromises a relevant package release, its dependency chain, or a package index trusted by the user's environment.
- A user follows the OCR prerequisite in
SKILL.md. - The user runs
pip install pytesseract pdf2imagewithout version or hash verification. pipresolves and downloads mutable artifacts from the configured index.- Malicious package code executes during installation or subsequent import.
- The code runs with the privileges of the user performing the installation or PDF-processing task.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the installing user's account. The resulting access could include reading or modifying files available to that account, tampering with processed PDFs, accessing documents supplied to the workflow, and using the user's network permissions.
The project does not request elevated privileges, and the reviewed code contains no privilege-escalation mechanism. Consequently, the direct impact is limited to the privileges and environment of the user running
pip.- Remediation
View remediation
Remediation Suggestions
- Replace the inline installation instruction with a reviewed and version-controlled dependency manifest.
- Pin exact versions for direct and transitive dependencies.
- Generate and verify cryptographic hashes, then install with:
bash python -m pip install --require-hashes -r requirements.txt - Use an explicitly approved package index or internal artifact repository.
- Regularly scan pinned dependencies for known vulnerabilities and review updates before changing the lockfile.
- Install dependencies inside an isolated virtual environment or container using a non-privileged account.
- Document the expected package names and sources to reduce dependency-confusion and index-substitution risks.
