T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Hedera SDK Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 12 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ```bash npm install @hashgraph/sdk ``` ### Technical Analysis The setup command installs `@hashgraph/sdk` without specifying an exact, reviewed version or using a committed lockfile. As a result, the effective dependency can change after the Skill has been audited. The package is consistent with the Skill's stated Hedera token-management purpose, and no evidence indicates that the package is currently malicious. However, relying on the mutable latest release creates a supply-chain risk if a future release is compromised or introduces unsafe behavior. Depending on npm and package configuration, installation can also execute package lifecycle scripts with the permissions of the user performing the installation. ### Attack Path 1. An attacker compromises the upstream package, its maintainer account, or its release process. 2. The attacker publishes a malicious version under the legitimate `@hashgraph/sdk` package name. 3. A user follows the documented unpinned installation command. 4. npm resolves and downloads the malicious latest version. 5. Malicious lifecycle code may execute during installation, or malicious library code may execute when imported and used by the token-management examples. ### Impact Assessment Successful exploitation could execute code with the privileges of the user running npm or the application. Depending on the environment, this could expose local files, environment variables, Hedera credentials, account keys, or transaction data. Malicious SDK behavior could also alter, redirect, or forge token-related operations initiated by the application. The practical scope is limited by the installing user's operating-system permissions and the credentials available to the application.
- Remediation
- ## Remediation Suggestions - Pin `@hashgraph/sdk` to an exact version that has been reviewed, rather than installing the mutable latest release. - Generate and commit a package lockfile, then use `npm ci` in reproducible installation and deployment workflows. - Review dependency integrity information and monitor the pinned package version for security advisories. - Use an approved package registry and enforce dependency allowlists where possible. - Consider installing with lifecycle scripts disabled, such as `npm ci --ignore-scripts`, when compatible with the package and build process. - Upgrade dependencies through a controlled review process that evaluates release notes, package provenance, integrity hashes, and transitive dependency changes.
