T08 · Insecure Dependencies
- Location
SKILL.md:29- Finding
Unpinned Third-Party Package Execution via npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 29
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code:
bash npx molthub registerTechnical Analysis
The skill recommends running
npx molthub registerwithout specifying an exact package version or verifying an integrity hash, publisher, or trusted source revision. If the package is not already available locally,npxmay retrieve the currentmolthubrelease 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
- An attacker compromises the
molthubpackage, its publisher account, or a package source used by the victim. - The attacker publishes a malicious release under the package name.
- A user or agent follows the skill's registration instructions and runs
npx molthub register. npxretrieves the current unpinned package release.- The malicious package executes with the permissions and environment of the invoking user.
- 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.
- An attacker compromises the
- Remediation
View 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.
