Back to skill

Security audit

wecom-user-manager

Security checks for vulnerabilities and agentic risk

Overview

This skill appears intended for Enterprise WeChat user administration, but it grants and changes account state through under-scoped, partially missing code paths.

Review this carefully before installing. Only deploy it in a controlled WeCom environment after confirming the missing dependency modules, import paths, activation authentication, audit logging, and users.json synchronization process are safe for your organization.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (2)

T07 · Tool Hijacking and Spoofing

Error
Location
handler.py:13
Finding

Import Path Precedence Enables Local Module Hijacking

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
auto_activate.py:25
Finding

Pending Accounts Can Be Activated Using Unverified Caller-Supplied Identity Data

Content
View full analysis
tuple: """ Check and activate a user. Args: userid: WeCom UserID wecom_name: Name obtained from WeCom Returns: (activated: bool, message: str) """ pm = get_permission_manager() # Check whether the user exists if userid not in pm.users: return False, f"❌ User does not exist: {userid}\n\nPlease contact an administrator to add permissions" user = pm.users[userid] # Check whether the user is already activated if not user.username.startswith("待激活_"): # Update the last login time for an activated user user.last_login = datetime.now().isoformat() pm._save_users() return False, f"Welcome back, {user.username}!" # Activate the user old_username = user.username user.username = wecom_name user.last_login = datetime.now().isoformat() user.updated_at = datetime.now().isoformat() # Save the user pm._save_users() ``` ```python # auto_activate.py:91-99 userid = sys.argv[2] wecom_name = sys.argv[3] activated, message = check_and_activate(userid, wecom_name) result = { "activated": activated, "message": message } ``` The original source contains localized comments and messages; the control flow above is reproduced without changing its security-relevant behavior. ### Technical Analysis The activation function treats `userid` and `wecom_name` as authoritative identity attributes. It verifies only that the supplied UserID exists and that the stored username begins with the pending-account prefix. It does not: - Authenticate the caller. - Bind the supplied UserID to the authenticat ...[truncated 2471 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

该代码与描述存在部分不符。描述涵盖更广泛的“用户管理”“管理员添加用户权限”“完整生命周期管理”,而实际代码块的核心功能只是自动激活已预先存在的用户账号,并更新登录相关字段、生成欢迎消息。它并不执行管理员添加权限、用户创建、停用、删除或其他完整生命周期操作。虽然“用户首次登录自动激活”这一点与描述一致,但整体声明明显超出此代码块实际能力,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

声明将该技能描述为完整的企业微信用户管理能力,涵盖添加权限、首次登录自动激活和完整生命周期管理。但提供的代码块只展示了一个处理“添加用户”消息的处理器:检查发起人权限、解析命令、搜索门店、处理门店匹配数量,并生成确认卡片返回。虽然代码中导入了 check_and_activate、handle_callback、on_user_login 等函数,说明项目可能存在相关能力,但在本代码块内并没有调用这些逻辑,因此就“实际代码块 actually does”而言,不能支持“首次登录自动激活”或“完整生命周期管理”的声明。故描述相对代码行为存在明显夸大与范围不符。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The markdown states that first login will "自动激活" and elsewhere explains that the system updates the pending user record to the real name and records login time. These are changes to user data and account state, but the documentation does not clearly warn operators or end users that a first greeting/login can trigger automatic profile modification and persistence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The document says the user's real name is automatically fetched from Enterprise WeChat on first login, which involves collecting personal data from an external system. While functionality is described, there is no explicit warning about this data access, storage, or its privacy implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown describes automatic activation as updating the username, recording login time, and later notes that users.json files are auto-synchronized, but it does not present these behaviors as a user-facing warning about modifying stored user data. Because these actions affect account data and configuration state, the description should explicitly disclose them as operational side effects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Triggering first-time activation on any inbound message is overly permissive because it treats mere message receipt as sufficient proof that activation should occur. In a user-management context, this can activate accounts unintentionally, enable premature state changes, and reduce the opportunity for explicit approval or verification before modifying user records.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The troubleshooting and best-practice sections recommend direct copy operations for users.json without warning about overwriting authoritative configuration or losing concurrent updates. In a user-management skill, unsafe config synchronization can corrupt account state, roll back permissions, or unintentionally reactivate/deactivate users if operators follow the instructions blindly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains its primary documentation and user-facing interaction text in Chinese, and there is no indication that the skill is region-specific or that users can opt into a preferred language. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation describes privileged account-management operations that can create users, assign roles, and activate accounts, but it does not clearly warn that these actions change access control state and should only be performed with verified administrative intent. In an agent skill context, this omission increases the risk of unsafe automation or accidental privilege provisioning, especially because the examples are directly executable tool calls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

Natural-language content throughout the file forces a single language/locale presentation without offering the user a choice or documenting a justified locale restriction. Under the stated policy, this can be a language/locale policy violation unless the constraint is explicit and justified.

Content

No source excerpt is available for this finding.