T08 · Insecure Dependencies
- Location
SKILL.md:215- Finding
Unpinned Python Dependencies Allow Supply-Chain Substitution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:215
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code
python # Requires: pip install pytesseract pdf2imageTechnical Analysis
The installation instruction retrieves
pytesseractandpdf2imagewithout 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
- An attacker compromises a named dependency, one of its transitive dependencies, or the package distribution channel.
- The attacker publishes a malicious release that remains compatible with the unpinned package name.
- A user follows the documented
pip install pytesseract pdf2imageinstruction. pipresolves and installs the attacker-controlled release.- 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
pipor 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
View 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.
