T08 · Insecure Dependencies
- Location
references/weixin-api.md:12- Finding
Unpinned Third-Party Package Is Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
references/weixin-api.md, line 12
Vulnerability Type: Supply-chain exposure through mutable package execution
Risk Level: MediumVulnerable Code Snippet:
bash npx -y @tencent-weixin/openclaw-weixin-cli installTechnical Analysis
The documented installation command invokes
npxwithout specifying an exact package version. Consequently, it resolves the package version available from the configured package registry at execution time, downloads it, and runs its package-defined executable and installation logic.The
-yoption suppresses the interactive installation confirmation. The command also provides no integrity hash, package-signature check, registry restriction, or documented version-verification step. Therefore, the code ultimately executed can differ from the code that was reviewed when this Skill was published.This creates a supply-chain trust boundary: compromise of the package, its publisher account, the configured registry, or a newly published package version could convert the documented installation step into arbitrary local code execution.
Attack Path
- An attacker compromises the package publisher, package registry, or an upstream release process.
- The attacker publishes a malicious or backdoored version of
@tencent-weixin/openclaw-weixin-cli. - A user follows the documented unversioned
npx -ycommand. npxresolves and downloads the attacker-controlled current version.- Package installation or CLI code executes with the privileges of the user running the command.
- The malicious package can access data available to that user, including local OpenClaw configuration and credentials.
Impact Assessment
Successful exploitation can provide arbitrary code execution under the invoking user's account. The accessible scope may include OpenClaw configuration, WeChat account tokens, session metadata, files readable by ...[truncated 284 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the dependency to a reviewed exact version, for example:
bash npx --yes @tencent-weixin/openclaw-weixin-cli@<reviewed-exact-version> install -
Document the expected official registry and instruct users to verify their registry configuration before installation.
-
Publish and verify an integrity digest or signed release artifact where the package ecosystem supports it.
-
Review the pinned package version, including lifecycle scripts and transitive dependencies, before recommending execution.
-
Avoid suppressing interactive confirmation unless automation requires it and all validation has already occurred.
-
Run installation with a least-privileged account and prevent the installer from accessing unrelated credentials.
-
Establish a controlled process for reviewing and deliberately updating the pinned version.
-
