T08 · Insecure Dependencies
- Location
SKILL.md:324- Finding
Unpinned Third-Party Dependencies in OCR Installation Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:324
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumComplete Code Snippet:
python # Requires: pip install pytesseract pdf2imageTechnical Analysis
The OCR instructions direct the agent or user to install
pytesseractandpdf2imagewithout specifying reviewed versions, cryptographic hashes, a lockfile, or a trusted package index. Consequently, package resolution is mutable and depends on the configured Python package source at installation time.If an upstream package, transitive dependency, or configured package index is compromised, attacker-controlled code could run during package installation or when the dependency is imported. This is a supply-chain weakness rather than evidence that the named packages are currently malicious.
Attack Path
- A user asks the agent to extract text from a scanned PDF.
- The agent follows the prerequisite at
SKILL.md:324. pipresolves the latest available package versions from its configured index.- An attacker compromises a resolved package, transitive dependency, release account, or package source.
- Malicious package code executes during installation or subsequent import.
- The code operates with the privileges and filesystem or network access of the process running the installation or OCR task.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the privileges of the invoking user or agent runtime. Depending on that environment's permissions, the affected scope could include accessible project files, user-owned files, environment variables, credentials available to the process, and reachable network resources. The instruction itself does not request elevated privileges, persistence, or unauthorized access, so the maximum practical impact depends on the runtime's existing permissions.
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed exact version.
- Resolve and pin all transitive dependencies in a lockfile.
- Require cryptographic hashes by using a hashed requirements file with
pip install --require-hashes. - Configure an explicitly trusted package index or an internally controlled artifact repository.
- Perform dependency vulnerability and provenance checks before approving updates.
- Install dependencies in an isolated, least-privilege virtual environment or container.
- Avoid granting the installation process administrative permissions or unnecessary access to credentials and sensitive files.
- Replace the inline installation comment with a reproducible command, for example:
bash python -m pip install --require-hashes -r requirements-ocr.txt
