T08 · Insecure Dependencies
Warning
- Location
- README.md:41
- Finding
- Mutable npm Package Is Downloaded and Executed Through npx<![CDATA[ ## Vulnerability Details **File Location**: `README.md:41-44` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```markdown ## Publishing to MoltHub ```bash npx molthub@latest publish ``` ``` ### Technical Analysis The documented publishing command instructs users to execute the mutable `latest` release of the `molthub` npm package. When the command is run without an already trusted local installation, `npx` may download the package and execute its entry point. The effective code can therefore change after this Skill has been reviewed. The command is related to publishing rather than ordinary QR generation or decoding, and there is no evidence that the Skill invokes it automatically. Nevertheless, a user following the documented workflow would execute supply-chain code that is not pinned to a reviewed version or integrity value. ### Attack Path 1. An attacker compromises the upstream `molthub` package, its maintainer account, or the package publication process. 2. The attacker publishes a malicious release and assigns or causes it to receive the `latest` distribution tag. 3. A user follows the README and runs `npx molthub@latest publish`. 4. `npx` retrieves and executes the mutable package release. 5. The malicious package executes with the privileges and environment of the user running the command. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the publishing user's privileges. Depending on the user's environment, exposed resources could include source code, repository credentials, npm authentication tokens, environment variables, and files accessible to that account. No privilege escalation beyond the invoking user's existing permissions is demonstrated by the project. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace `@latest` with an explicitly reviewed version, for example `npx molthub@<reviewed-version> publish`. - Prefer installing the publishing tool from a lockfile with integrity metadata and invoking that locked local installation. - Use `npx --no-install` where practical to prevent an invocation from silently downloading an absent package. - Review the selected package release, its transitive dependencies, and lifecycle scripts before use. - Keep publishing tooling separate from the runtime installation instructions so users do not mistake it for a required operational dependency. - Run publishing tools in a restricted environment with only the minimum credentials and filesystem access needed for publication. ]]>
