T08 · Insecure Dependencies
- Location
SKILL.md:176- Finding
Unpinned Third-Party Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 176
Vulnerability Type: Unpinned and unverifiable third-party dependencies
Risk Level: MediumVulnerable Code Snippet
python # Requires: pip install pytesseract pdf2imageTechnical Analysis
The OCR example instructs users or an AI agent to install
pytesseractandpdf2imagewithout specifying reviewed versions, cryptographic hashes, a lockfile, or an explicitly trusted package index. Dependency resolution can therefore change over time even though the reviewed skill content remains unchanged.If an upstream package release or configured package source is compromised, following this instruction could install attacker-controlled code. Python packages may execute code during installation or later when imported by the OCR example.
Attack Path
- An attacker compromises a future release of one of the named packages, its distribution account, or a package source configured in the execution environment.
- A user or agent follows the OCR instructions and runs
pip install pytesseract pdf2image. pipresolves the unpinned dependency to the compromised release.- Attacker-controlled package code executes during installation or when the installed module is imported.
- The malicious code operates with the privileges of the user or agent running the installation or OCR workflow.
Impact Assessment
Successful exploitation could allow arbitrary code execution under the installing user's privileges. Depending on the execution environment, this may expose locally accessible documents, environment variables, credentials, and writable project files. It could also permit modification of generated PDF-processing outputs or installation of additional malicious components.
The skill does not itself contain or retrieve a confirmed malicious package; exploitation depends on compromise or unsafe configuration of the external dependency supply chain.
- Remediation
View remediation
Remediation Suggestions
- Pin each dependency to a reviewed, exact version rather than allowing unconstrained resolution.
- Maintain dependencies in a lockfile or requirements file containing cryptographic hashes.
- Install with hash verification, for example using
pip install --require-hashes -r requirements.txt. - Explicitly use an approved package index and disable unintended supplemental indexes to reduce dependency-confusion exposure.
- Review package provenance, release signatures where available, maintainers, and transitive dependencies before updating pinned versions.
- Perform installation and PDF processing in an isolated, least-privileged virtual environment or container without unnecessary access to credentials or sensitive files.
