T08 · Insecure Dependencies
- Location
README.md:114- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
README.md:114
Additional Location:CLAWHUB.md:112
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code:
bash pip install opencv-python numpy pytesseractTechnical Analysis
The installation instructions retrieve mutable package versions from the user's configured Python package index. No exact versions, cryptographic hashes, lockfile, or trusted index are specified. Consequently, the code that users install may differ from the code reviewed during this audit.
Python package installation can execute package build or installation logic with the privileges of the invoking user. A compromised upstream release, dependency-confusion condition, malicious index configuration, or unexpected future package release could therefore introduce arbitrary code or silently change OCR behavior.
The audited package names appear consistent with the declared OCR functionality, and no evidence shows that the project intentionally references a malicious or typosquatted package. This finding concerns insufficient supply-chain controls rather than a confirmed malicious dependency.
Attack Path
- A user follows the documented installation command.
pipresolves the latest available package versions from the user's configured package indexes.- An attacker compromises an upstream distribution or causes a malicious distribution to be preferred through index manipulation or dependency confusion.
pipdownloads and installs that unaudited distribution.- Malicious build or installation code executes with the user's privileges, or malicious runtime code executes when the OCR scripts import the package.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user running
pipor the OCR application. This could expose files accessible to that account, alter OCR results, modify application data, or install addition ...[truncated 131 chars]- Remediation
View remediation
Remediation Suggestions
- Define reviewed, exact dependency versions in a requirements or lock file, for example:
text opencv-python==REVIEWED_VERSION numpy==REVIEWED_VERSION pytesseract==REVIEWED_VERSION- Generate and verify cryptographic hashes for all packages and transitive dependencies, then install with:
bash python -m pip install --require-hashes -r requirements.txt-
Document and enforce an approved package index rather than relying on arbitrary user-level
pipconfiguration. -
Prefer installation inside a dedicated virtual environment under a non-privileged account.
-
Add automated dependency vulnerability and provenance checks to the release process.
-
Keep
README.mdandCLAWHUB.mdsynchronized so both direct users to the same locked installation procedure.
