T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Security-Critical Dependency Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1, with installation behavior ininstall.py:138-149and automatic bootstrap inkaswallet.sh:43-44
Vulnerability Type: Unpinned executable third-party dependency
Risk Level: MediumVulnerable Code
requirements.txt:1:text kaspainstall.py:138-149:python log("Installing dependencies...") pip_cmd = [str(venv_python), "-m", "pip", "install", "--upgrade", "pip"] try: run_command(pip_cmd, capture=True) except subprocess.CalledProcessError: log("Warning: Could not upgrade pip, continuing anyway...") pip_install = [str(venv_python), "-m", "pip", "install", "-r", str(REQ_FILE)] try: run_command(pip_install)kaswallet.sh:43-44:bash echo "Python venv not found. Bootstrapping with: $PY install.py" >&2 "$PY" install.py >&2Technical Analysis
The wallet installs
kaspawithout an exact version constraint or package integrity hash. Consequently, each fresh installation resolves whichever compatible package release is available from the configured Python package index at that time.This dependency is imported into a process that handles
KASPA_PRIVATE_KEYorKASPA_MNEMONIC, derives wallet keys, builds transactions, and signs payments. A compromised or unexpectedly modified package release would therefore execute within a highly sensitive security context.The launcher increases exposure by automatically invoking the installer whenever the local virtual environment is missing. A command that appears to run the wallet can therefore first download and execute newly resolved third-party package code.
Attack Path
- An attacker compromises the upstream package, its publishing credentials, the configured package index, or a dependency selected during resolution.
- A user runs
python3 install.py, or invokeskaswallet.shwhile.venvis absent. - Pip resolves and insta ...[truncated 838 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
kaspaand all transitive dependencies to reviewed, exact versions. - Generate a lock file containing cryptographic hashes and install with pip's
--require-hashesoption. - Review package provenance, publisher identity, release signatures, and dependency changes before updating the lock file.
- Separate installation from wallet execution. If
.venvis missing, fail with explicit instructions instead of automatically downloading executable dependencies. - Use a controlled package repository or verified artifact mirror for production wallet deployments.
- Add automated dependency vulnerability and integrity scanning to the release process.
- Pin
