Back to skill

Security audit

WeCom文件发送

Security checks for vulnerabilities and agentic risk

Overview

This skill is a file-sharing helper, but it can direct WeCom to send local workspace and company-memory files without clear authorization or confirmation safeguards.

Install only if WeCom file sending from this agent's local workspace is intended and governed by your organization. Users should treat companywork and memory paths as sensitive, require an exact file and recipient, confirm before every send, and avoid credentials, internal records, customer data, or regulated content unless policy explicitly permits sharing.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:22
Finding

Unrestricted Enumeration and Transmission of Local Files

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22–39
Vulnerability Type: Missing authorization and path-scope controls for local file disclosure
Risk Level: High

Relevant instruction excerpt:

text
Files are stored in the following directories:
- Main workspace: `~/.openclaw/workspace/`
- Company business directory: `~/.openclaw/workspace/memory/companywork/`
- Video content: `~/.openclaw/workspace/memory/douyin-videos/`

In a response, place a MEDIA instruction on its own line, followed by the local file path.

Format:
MEDIA: /absolute/path/to/file

Examples:
MEDIA: ~/.openclaw/workspace/memory/companywork/meeting-notes.md
MEDIA: ~/openclaw/workspace/test.pdf

Related file-discovery instructions also appear at SKILL.md, lines 53–57:

bash
ls -la ~/.openclaw/workspace/memory/companywork/

Technical Analysis

The skill explicitly identifies workspace, persistent memory, and company-business directories, instructs the agent to enumerate their contents, and permits a MEDIA: directive containing an arbitrary absolute local path. It does not require the agent to:

  • Verify that the requester owns or is authorized to receive the file.
  • Restrict selection to a dedicated export directory.
  • Canonicalize the requested path and enforce an allowlist.
  • Reject symbolic links that resolve outside an approved directory.
  • Detect credentials, secrets, persistent memory, or confidential business data.
  • Obtain explicit confirmation before transmitting sensitive material.

Consequently, a requester can prompt the agent to search for and transmit locally readable files unrelated to the requester's legitimate access rights. This breaks least-privilege boundaries at the application level. The reviewed material does not demonstrate elevation of operating-system privileges; exploitation is limited to files already readable by the agent process.

Attack Path

  1. An atta ...[truncated 1301 chars]
Remediation
View remediation

Remediation Suggestions

  1. Restrict file transmission to a dedicated export directory containing only files intentionally staged for sharing.
  2. Resolve every requested path to its canonical form and verify that it remains beneath the approved directory.
  3. Reject absolute paths supplied directly by users, parent-directory traversal, device paths, and symbolic links that escape the approved root.
  4. Require authenticated recipient authorization and verify that the recipient is permitted to access the selected file.
  5. Present the resolved filename, recipient, sensitivity classification, and destination for explicit confirmation before transmission.
  6. Deny transmission from memory, credential, configuration, and company-sensitive directories by default.
  7. Avoid unrestricted directory enumeration. Use a controlled file index filtered according to the requester's access rights.
  8. Add content and metadata checks for secrets, personal data, credentials, and confidential business information.
  9. Record auditable events for file selection, authorization, confirmation, and transmission without logging file contents or secrets.
  10. Ensure the downstream MEDIA: handler independently enforces the same path and authorization controls rather than trusting skill instructions alone.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description presents local file sending as a convenience feature without warning that it can transmit sensitive local or company data outside the current environment. Because the documented directories include business data locations, omission of a clear data-exfiltration warning increases the chance that users or downstream agents will treat sensitive file transfer as routine and safe.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are very broad and overlap with ordinary conversation such as '发送文件给我' or '把这个文件发给我', which can cause unintended activation of a capability that exfiltrates local files. In this skill, accidental invocation is especially risky because the action targets local workspace and company directories and results in external file transmission over WeCom.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly lists company business directories as candidate sources for file transfer but provides no warning or restriction around sensitive corporate data. In context, this makes the capability more dangerous than a generic file-share utility because it normalizes selecting files from a business-data path and sending them to a user over chat, which is a direct exfiltration pathway.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill instructs the agent to enumerate a local directory with ls in order to locate files for transfer. Enumeration alone is often legitimate, but here it directly supports discovery of potentially sensitive files in a companywork path and facilitates subsequent exfiltration, so the context makes it materially riskier.

Content

Scanner excerpt · SKILL.md (reported line 57)May include surrounding context.

使用 ls 命令查找文件:

bash
ls -la ~/.openclaw/workspace/memory/companywork/

注意事项

Static analysis

No suspicious patterns detected.