T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:29
- Finding
- Unpinned Third-Party Package Execution via npx## Vulnerability Details **File Location**: `SKILL.md`, line 29 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium **Vulnerable Code**: ```bash npx molthub register ``` ### Technical Analysis The skill recommends running `npx molthub register` without specifying an exact package version or verifying an integrity hash, publisher, or trusted source revision. If the package is not already available locally, `npx` may retrieve the current `molthub` release from the configured package registry and execute it immediately. Consequently, the code executed by this command can change after the skill has been reviewed. Compromise of the package, its publisher account, or the configured registry could turn this documented registration step into arbitrary local code execution. ### Attack Path 1. An attacker compromises the `molthub` package, its publisher account, or a package source used by the victim. 2. The attacker publishes a malicious release under the package name. 3. A user or agent follows the skill's registration instructions and runs `npx molthub register`. 4. `npx` retrieves the current unpinned package release. 5. The malicious package executes with the permissions and environment of the invoking user. 6. It can access resources available to that user, potentially including files, environment variables, and credentials. ### Impact Assessment Successful exploitation permits arbitrary code execution with the invoking user's privileges. The accessible scope can include user-readable and user-writable files, environment variables, network access, and credentials exposed to the process. The command does not itself request elevated privileges, so impact is ordinarily bounded by the invoking account's existing permissions.
- Remediation
- ## Remediation Suggestions - Prefer the documented HTTPS registration API and remove the optional CLI execution path if it is unnecessary. - If the CLI must remain, pin an exact reviewed package version rather than resolving the latest release, for example: ```bash npx --yes molthub@<audited-exact-version> register ``` - Verify the package's publisher, source repository, provenance, signatures, and integrity metadata before recommending execution. - Use a lockfile or another reproducible dependency mechanism that validates integrity. - Run the CLI in a restricted environment with minimal filesystem access, minimal environment variables, no elevated privileges, and limited network access. - Avoid exposing unrelated credentials to the process and review each dependency update before changing the pinned version.
