T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:45
- Finding
- Unpinned Global Installation of a Wallet Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 45 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```javascript // send-hbar.js — requires: npm i -g @hashgraph/sdk ``` ### Technical Analysis The skill instructs users to install `@hashgraph/sdk` globally without specifying an exact version or verifying package integrity. Consequently, the installed code depends on whichever release the package registry resolves at installation time. A global installation also expands the potential effect beyond this skill's project directory. Package installation scripts and globally exposed executables may run with the permissions of the user performing the installation. Although the reviewed file contains no evidence that the named package is malicious, the installation method creates avoidable supply-chain exposure. ### Attack Path 1. The user follows the skill's prerequisite instruction. 2. The user runs `npm i -g @hashgraph/sdk`. 3. npm retrieves the currently resolved package and its transitive dependencies from the configured registry. 4. A compromised, malicious, or unexpectedly changed release executes installation logic or supplies altered wallet functionality. 5. The affected dependency can operate with the installing user's privileges and may influence subsequent transaction handling. ### Impact Assessment Successful exploitation could permit code execution with the privileges of the user running npm. Because the dependency is used for cryptocurrency transactions, compromised code could also expose transaction data, interfere with transaction construction, or attempt to access wallet credentials available to the process. The exact impact depends on the user's permissions, npm configuration, and secret-handling practices. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Install the dependency locally within a dedicated project rather than globally. - Pin an audited exact package version instead of resolving the latest release. - Commit and enforce a lockfile using `npm ci`. - Verify registry provenance and package integrity before installation. - Review direct and transitive dependencies for install scripts and known vulnerabilities. - Run wallet-related code in a least-privileged, isolated environment. - Document the supported SDK version and a controlled dependency-update process. ]]>
