T08 · Insecure Dependencies
- Location
SKILL.md:215- Finding
Unpinned Third-Party Package Installation Instruction
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 215
Vulnerability Type: Unpinned third-party dependencies installed from a mutable package repository
Risk Level: LowCode Snippet:
python ### Extract Text from Scanned PDFs ```python # Requires: pip install pytesseract pdf2image import pytesseract from pdf2image import convert_from_pathTechnical Analysis
The OCR example instructs users to install
pytesseractandpdf2imagewithout pinning reviewed versions or verifying package hashes. No dependency lockfile, trusted package index, or integrity-verification procedure is provided.Consequently, the packages resolved by
pipcan change after the Skill has been audited. Python package installation may execute package build or installation logic, while imported packages execute code with the privileges of the current Python process. This creates a supply-chain exposure if a named distribution, its maintainer account, release infrastructure, or configured package index is compromised.The reviewed instruction names established packages and does not exhibit direct evidence of typosquatting or an intentionally malicious source. The vulnerability is therefore conditional and rated Low rather than being treated as evidence of active malicious behavior.
Attack Path
- An attacker compromises a referenced package, a maintainer account, its release channel, or a package index configured on the target system.
- The attacker publishes a malicious package release under one of the referenced names.
- A user follows the unpinned
pip install pytesseract pdf2imageinstruction. pipresolves the mutable malicious release because no approved version or hash is enforced.- Malicious code executes during package installation, import, or subsequent OCR processing with the privileges of the invoking user.
Impact Assessment
Successful exploitation could execute arbitrary code wi ...[truncated 499 chars]
- Remediation
View remediation
Remediation Suggestions
-
Move dependencies into a reviewed requirements file and pin exact versions.
-
Record cryptographic hashes and require verification during installation, for example:
text pip install --require-hashes -r requirements.txt -
Generate and review a lockfile through a dependency-management tool such as
pip-tools. -
Document an explicitly trusted package index and disable unintended fallback indexes where appropriate.
-
Install dependencies in a dedicated virtual environment or container under a non-privileged account.
-
Continuously scan pinned dependencies for known vulnerabilities and review version updates before changing the lockfile.
-
Avoid recommending installation with administrator or root privileges.
-
