← MCP server and skill grades

skills

WecomTeam/wecom-cli/skills

C
Type
Skill
Scanned
Nov 13, 2026
Version
1d48b6c9ecd1
Files read
194

This project is a collection of AI agent skills and Python helper scripts for managing WeCom (Enterprise WeChat) emails, messages, calendars, meetings, cloud files, documents, spreadsheets, and presentations through wecom-cli. The biggest risk is that summarizing a shared smartpage automatically fetches any embedded image URL with curl without domain checks—allowing a stranger's document to probe internal network services or contact external servers—alongside risky defaults like sending emails without confirmation, installing unpinned global packages at runtime, and loading a shared /tmp libra

What it can reach

Shell commands
Runs wecom-cli commands, npm install -g @wecom/cli, curl, LibreOffice (soffice), gcc, and bundled Python scripts for Office document processing.
Files
Reads and writes local Office documents (.docx, .xlsx, .xlsm, .pptx, .csv), Markdown and JSX working files, downloaded email or cloud drive attachments, temporary files in /tmp, and the user's LibreOffice macro configuration.
Network
Communicates with WeCom cloud APIs across mail, chat, calendar, meetings, docs, sheets, and cloud drive, posts to user-supplied smartsheet webhooks, and fetches image URLs referenced in smartpage Markdown or slide JSX.
Secrets
Checks and initializes the user's WeCom login credentials via wecom-cli auth and handles temporary smartsheet webhook keys.

Findings

1 high3 medium3 low
  1. HighUnvalidated curl downloads of image URLs inside shared smartpage documents

    skills/wecomcli-smartpage/references/smartpage-edit.md:73

    When a user asks the agent to summarize, translate, or answer questions about a smartpage document, this mandatory workflow instructs the agent to extract every Markdown image URL from the document and download it locally with curl -sSL before reading the file. Although the note mentions that links usually come from qpic.cn, no domain, scheme, or redirect check is required. A stranger who shares a document containing crafted image links can trigger requests from the user's machine to external tracking servers, local file:// paths, or localhost and internal corporate services (SSRF), and have the downloaded content read back into the agent's context.

    Fix: Restrict automatic downloads strictly to https:// URLs on trusted WeCom CDN domains (such as *.qpic.cn), disable or validate redirects, and pass --proto '=https' to curl.

  2. MediumPredictable /tmp path used for LD_PRELOAD shared library in recalc.py

    skills/wecomcli-sheet/scripts/recalc.py:68

    When Unix domain sockets are blocked (such as inside restricted containers or sandboxes), recalc.py compiles a C shim to /tmp/lo_socket_shim.so and sets LD_PRELOAD to that path before launching LibreOffice. If /tmp/lo_socket_shim.so already exists, the script reuses it immediately without checking file ownership or integrity. On a multi-user host or shared /tmp environment where sockets are restricted, another local user can pre-create /tmp/lo_socket_shim.so (or race /tmp/lo_socket_shim.c) to execute arbitrary native code under the installer's account.

    Fix: Compile and store both the C source file and shared object inside a private directory created with tempfile.mkdtemp() (mode 0700) owned by the current user, and delete it after soffice finishes.

  3. MediumAutomatic runtime installation of unpinned global npm package without confirmation

    skills/wecomcli-shared/SKILL.md:22

    Every skill in this collection mandates running wecomcli-shared before any command. If wecom-cli is missing or older than version 1.2.1, the skill instructs the agent to immediately run npm install -g @wecom/cli without asking the user for permission, without pinning an exact version, and without disabling lifecycle scripts (wecomcli-doc and wecomcli-sheet similarly instruct automatic installation of missing Python or system packages). Automatically installing unpinned global packages at runtime modifies the user's system environment without consent and exposes them to npm supply-chain compromises.

    Fix: Ask the user for explicit confirmation before installing or upgrading global software, pin @wecom/cli to a verified version, and pass --ignore-scripts if install hooks are unnecessary.

  4. MediumEmail skill forbids asking for user confirmation before sending

    skills/wecomcli-email/SKILL.md:205

    The email skill can send, forward, and reply-all (its default) to external addresses, attach arbitrary local files via file_path, and cannot recall sent emails. Even though references/security.md tells the agent to warn the user to verify before sending when a recipient address comes from an email body or an external domain, SKILL.md explicitly forbids waiting for confirmation after showing the preview—and hides actual email addresses in the preview. If prompt injection in untrusted content steers the agent into forwarding internal emails or attaching local files to an attacker's address, the message leaves the machine before the user can stop it.

    Fix: Require explicit user confirmation—showing full recipient email addresses and any attached local file paths—before executing wecom-cli mail send, especially for external recipients or file attachments.

  5. LowSpreadsheet recalculation overwrites the user's default LibreOffice macro module

    skills/wecomcli-sheet/scripts/recalc.py:259

    To recalculate Excel formulas, recalc.py writes its RecalculateAndSave macro directly over ~/Library/Application Support/LibreOffice/4/user/basic/Standard/Module1.xba (macOS) or ~/.config/libreoffice/4/user/basic/Standard/Module1.xba (Linux) whenever RecalculateAndSave is not already present. Because Standard/Module1.xba is LibreOffice's default user macro file, any personal macros the user previously stored there are silently erased without backup.

    Fix: Launch soffice with -env:UserInstallation=file://<temp_dir> so the temporary macro is written to an isolated, disposable LibreOffice profile instead of modifying the user's personal configuration.

  6. LowMissing shell-quoting rules when interpolating untrusted email subjects into bash commands

    skills/wecomcli-email/references/forward-mail.md:93

    While wecomcli-pptx, wecomcli-smartpage, and wecomcli-smartsheet include a strict shell-quoting section teaching the agent how to escape single quotes safely, wecomcli-email (along with calendar, meeting, disk, todo, and sheet) omits those rules while telling the agent to preserve original email subject punctuation verbatim inside single-quoted --json '{...}' shell templates. If an agent substitutes an attacker-crafted email subject containing single quotes and shell metacharacters without proper escaping, shell command injection can occur.

    Fix: Add the same single-quote shell escaping rules used in wecomcli-smartpage to all skills, or pass JSON payloads via files or Python subprocess argument arrays without shell=True.

  7. LowSlide helper script fetches arbitrary Image src URLs without scheme or host checks

    skills/wecomcli-pptx/scripts/build_page.py:326

    Although wecomcli-pptx policy states that <Image src> may only contain URLs returned by the WeCom image upload endpoint, build_page.py falls back to calling urllib.request.urlopen() on any URL not found in images.json. Because urlopen accepts file://, http://, and internal network addresses, prompt injection in reference material that tricks the agent into placing an internal or local URL into JSX causes build_page.py to read up to 64 KB from that target during validation.

    Fix: Validate that the URL uses https:// and belongs to an expected WeCom image host before calling urlopen, or require all image dimensions to come from images.json.