T08 · Insecure Dependencies
- Location
SKILL.md:13- Finding
Unpinned Global Third-Party CLI Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 13
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet:
markdown - **Dependency tool**: Install `wenyan-cli` (`pnpm add -g @wenyan-md/cli`).Technical Analysis
The documented installation command retrieves the latest available version of
@wenyan-md/cliwithout specifying an audited version or verifying package integrity. It also installs the package globally, making its executable available across the user's environment.Package installation can execute package lifecycle scripts, while later CLI invocation executes code supplied by the installed package. If the package, its maintainer account, or a transitive dependency is compromised, a malicious release could execute under the privileges of the user performing the installation. This is a supply-chain exposure rather than evidence that the currently published package is malicious.
Attack Path
- An attacker compromises the package publishing account, package registry entry, or a transitive dependency.
- The attacker publishes a malicious version that remains compatible with the unpinned package name.
- A user follows the documented
pnpm add -g @wenyan-md/cliinstruction. - The package manager retrieves the malicious current version.
- Malicious code runs through an installation lifecycle script or when the globally installed
wenyancommand is invoked. - The code accesses resources available to that user, potentially including WeChat credentials exported as
WECHAT_APP_IDandWECHAT_APP_SECRET.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the installing or invoking user. The affected scope may include user-accessible files, environment variables, network credentials, and content submitted through the publishing workflow. A global installation ...[truncated 251 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specifically reviewed version, for example
@wenyan-md/cli@<audited-version>. - Record and verify the package-manager lockfile and integrity metadata where the deployment model permits it.
- Prefer a project-local installation over a global installation so the dependency is isolated and reproducible.
- Review the selected release, its lifecycle scripts, and its transitive dependency tree before use.
- Install and execute the CLI as a dedicated least-privileged user or inside a restricted container.
- Expose
WECHAT_APP_IDandWECHAT_APP_SECRETonly to the publishing process and only for the duration required. - Use an approved private registry or dependency allowlist when operating in a sensitive environment.
- Pin the dependency to a specifically reviewed version, for example
