Back to skill

Security audit

WeCom MCP Setup

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent WeCom setup guide, but it asks users to run an unpinned third-party MCP package with enterprise credentials and elevated tool access.

Review the `wecom-mcp-server` package source and publisher before using this skill, pin it to a reviewed exact version, use a least-privilege WeCom application, restrict the MCP process where possible, and rotate the WeCom secret if you suspect the package or environment was exposed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:28
Finding

Unpinned Third-Party Package Execution with Access to WeCom Credentials

Content
View full analysis
", "WECOM_AGENT_ID": "<你的应用ID>", "WECOM_SECRET": "<你的应用密钥>" ``` ### Technical Analysis The configuration directs `npx` to retrieve and execute `wecom-mcp-server` without specifying an exact package version. The `-y` option suppresses confirmation prompts, allowing the package selected by the registry at execution time to run automatically. No lockfile, package integrity hash, verified source reference, or publisher-verification procedure is provided. Consequently, the effective executable can change after the Skill has been reviewed. A compromised package release, registry account, or dependency could introduce arbitrary code. The downloaded process receives `WECOM_CORP_ID`, `WECOM_AGENT_ID`, and `WECOM_SECRET` through its environment. Malicious package code could read and transmit these credentials while also operating with the filesystem, network, and process privileges of the OpenClaw user. ### Attack Path 1. An attacker compromises the `wecom-mcp-server` package, its publisher account, or a transitive dependency and publishes a malicious release. 2. A user follows the Skill instructions and configures the MCP server using the unversioned package name. 3. OpenClaw starts the server by executing `npx -y wecom-mcp-server`. 4. `npx` retrieves the currently resolved package release without interactive confirmation. 5. The malicious package executes with the privileges of the OpenClaw user. 6. The package reads the WeCom corporate identifier, application identifier, and application secret from its environment. 7. The attacker can exfiltrate those credentials or misuse the application's authorized WeCom capabilities. ### Impact Assessment Successful exploitati ...[truncated 680 chars]
Remediation
View remediation
"] ``` 2. Prefer installing the dependency during a controlled deployment process instead of downloading it whenever the MCP server starts. 3. Maintain and verify a lockfile and package integrity metadata. 4. Confirm that the package is distributed by the expected official publisher and review its source and transitive dependencies. 5. Use a trusted internal registry or approved package mirror where feasible. 6. Run the MCP server in a sandbox or container with restricted filesystem, process, and network access. 7. Create a least-privilege WeCom application that has only the API permissions required for intended operations. 8. Rotate the WeCom secret after any suspected package compromise and review relevant WeCom and Gateway logs for unauthorized activity. 9. Add dependency monitoring and require security review before upgrading the pinned package version. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep