T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:28
- Finding
- Unpinned Global Installation of a Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:28-34` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```markdown ## Install ```bash npm i -g openpayment ``` ``` ### Technical Analysis The skill instructs users or agents to install the `openpayment` npm package globally without specifying an exact version or verifying package integrity. Consequently, installation resolves to whichever package version the npm registry currently exposes under that name. Because the dependency's source is not included in the audited project, its installation scripts, transitive dependencies, and runtime behavior cannot be verified from this artifact. npm packages may execute lifecycle scripts during installation. Global installation also exposes the package across the user's environment and may execute installation logic with all privileges available to the npm process. This is a supply-chain weakness rather than evidence that the current `openpayment` package is malicious. ### Attack Path 1. An attacker compromises the upstream package, a maintainer account, or a relevant transitive dependency. 2. The attacker publishes a malicious package version under the expected package name. 3. A user or agent follows the skill instructions and runs `npm i -g openpayment`. 4. npm retrieves the latest matching version without enforcing a reviewed version or integrity value. 5. Malicious lifecycle scripts or package code execute with the privileges of the installing user. 6. The malicious package can access data and resources available to that account and remains available as a globally installed command until removed. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the account performing installation. Depending on that account's permissions, the affected scope could include user files, environment variables, agent credentials, network-accessible ...[truncated 291 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version rather than installing the latest release: ```bash npm install --global openpayment@<reviewed-exact-version> ``` 2. Verify the package's provenance and integrity before installation, including the publisher, repository, release history, and npm integrity metadata. 3. Maintain a lockfile or equivalent controlled dependency manifest where the execution environment permits it. 4. Prefer a project-local installation over a global installation to reduce system-wide exposure. 5. Execute the package in an isolated, least-privileged environment with restricted filesystem, credential, and network access. 6. Disable npm lifecycle scripts where compatible with the package: ```bash npm install --ignore-scripts openpayment@<reviewed-exact-version> ``` 7. Review the pinned package and its transitive dependencies before approving upgrades. ]]>
