Back to skill

Security audit

ZeeLin Deep Research 深度研究

Security checks for vulnerabilities and agentic risk

Overview

The skill provides the advertised research service, but it sends user content to external services and includes broad automated file-delivery workflows that need review before installation.

Review this skill before installing in any environment that may handle confidential, regulated, or proprietary research topics. Users should understand that prompts and report data are processed by ZeeLin, and Feishu use can upload report contents to Feishu. The background exec and temporary-file examples should be hardened before shared or automated use.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:514
Finding

Shell Command Injection Through Unsafe Nested Command Construction

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:514-517
Vulnerability Type: Shell command injection
Risk Level: High

Vulnerable Code

bash
exec command="
  SESSION_ID='$SESSION_ID'
  API_KEY='$API_KEY'
  
  # Poll until completion

Technical Analysis

The documented background workflow constructs a new shell command by directly interpolating SESSION_ID and API_KEY inside single-quoted shell assignments. Neither value is shell-escaped before being embedded in the command string.

A single quote contained in either value terminates the intended assignment. The remaining characters are then interpreted as shell syntax when the nested command is executed. For example, a value shaped like the following would break out of the assignment:

text
'; attacker_command; #

API_KEY originates from the environment and may be supplied by a user or surrounding automation. SESSION_ID originates from the remote API response. Exploitation therefore requires control over one of these inputs, such as a maliciously supplied API key, a compromised endpoint, or manipulated API response.

Attack Path

  1. An attacker supplies a crafted DESEARCH_API_KEY, or gains control over the API response used to populate SESSION_ID.
  2. The value includes a single quote followed by shell syntax.
  3. The skill interpolates the value into the documented exec command="..." string without shell-safe encoding.
  4. The single quote closes the variable assignment.
  5. The nested shell parses and executes the injected command.
  6. The injected process inherits the operating-system privileges, accessible environment, filesystem access, and network access of the Agent process.

Impact Assessment

Successful exploitation permits arbitrary command execution under the account running the Agent. Depending on that account's permissions, an attacker could read or modify accessible files, steal environment cre ...[truncated 279 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not construct a nested shell program by interpolating untrusted values.
  • Pass SESSION_ID and API_KEY through the execution tool's environment-variable facility instead of embedding them in exec command.
  • Alternatively, pass values as positional arguments to a separately stored script.
  • If dynamic shell construction is unavoidable, encode every interpolated value with a reliable shell-escaping mechanism such as printf '%q'.
  • Validate SESSION_ID against the narrowest expected format, such as a fixed-length hexadecimal or UUID pattern.
  • Avoid exposing the API key in command text because command strings may be captured in logs or process-management records.
  • Run the workflow under a dedicated, least-privileged operating-system account with restricted filesystem and network access.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:532
Finding

Predictable Shared Temporary Paths Allow Symlink and File-Substitution Attacks

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:532 and SKILL.md:600-603
Vulnerability Type: Unsafe temporary-file handling
Risk Level: Medium

Vulnerable Code

bash
curl -s -o /tmp/report.pdf "$PDF_URL"

The Feishu workflow uses additional fixed paths:

bash
curl -s -o /tmp/research.docx "$WORD_URL"

# Extract text from the Word file
unzip -q /tmp/research.docx -d /tmp/research_docx/
sed 's/<[^>]*>//g' /tmp/research_docx/word/document.xml | tr -s ' \n' > /tmp/research.txt

Technical Analysis

The documented workflows use globally predictable names under /tmp, including /tmp/report.pdf, /tmp/research.docx, /tmp/research_docx/, and /tmp/research.txt. No private per-run directory is created, and the workflow does not check whether these paths are symbolic links or preexisting attacker-controlled objects.

On a multi-user or concurrently executing system, another local process can predict these names and create files, directories, or symbolic links before the workflow uses them. curl -o can follow a preexisting symbolic link when opening the output path, potentially overwriting its target with the downloaded report. Pre-created directories and files can also interfere with extraction or substitute content that is later sent to a user.

Reusing the same paths across concurrent jobs can additionally cause one user's report to overwrite or contaminate another user's output.

Attack Path

  1. A local attacker or another untrusted workload observes that the skill uses fixed paths under /tmp.
  2. Before the report workflow runs, the attacker creates a symbolic link at /tmp/report.pdf, /tmp/research.docx, or /tmp/research.txt pointing to a file writable by the Agent.
  3. Alternatively, the attacker pre-creates /tmp/research_docx/ and places or replaces files expected by the extraction workflow.
  4. The skill downloads or processes the report without validating owners ...[truncated 759 chars]
Remediation
View remediation

Remediation Suggestions

  • Create a private directory for every invocation:

    bash
    TMP_DIR=$(mktemp -d)
    chmod 700 "$TMP_DIR"
    trap 'rm -rf -- "$TMP_DIR"' EXIT
    
  • Store all downloaded and extracted files beneath that private directory.

  • Never reuse fixed global paths for separate users or concurrent tasks.

  • Reject preexisting output paths and verify that files are regular files rather than symbolic links before processing.

  • Use restrictive permissions through umask 077.

  • Validate downloaded files by checking HTTP success, expected content type, size limits, and format signatures before extracting or sending them.

  • Extract archives into a newly created private directory and apply resource limits to reduce archive-based denial-of-service risks.

  • Ensure cleanup occurs on success, failure, interruption, and timeout.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/research.sh (reported line 48)May include surrounding context.

sh
moreSettings: {}
  }));
' "$THINKING")
RESP=$(curl -s -X POST "${BASE_URL}/api/conversation/anew" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${API_KEY}" \
  -d "$BODY")

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/research.sh (reported line 74)May include surrounding context.

sh
INTERVAL=5
WAITED=0
while [[ $WAITED -lt $MAX_WAIT ]]; do
  STATUS_RESP=$(curl -s -X GET "${BASE_URL}/api/conversation/status?sessionId=${SESSION_ID}" -H "x-api-key: ${API_KEY}")
  STATUS=$(printf '%s' "$STATUS_RESP" | node -e '
    const fs = require("fs");
    try {

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/research.sh (reported line 102)May include surrounding context.

sh
fi

# 3) 获取历史回答
HISTORY=$(curl -s -X GET "${BASE_URL}/api/conversation/history?sessionId=${SESSION_ID}&pageSize=10&pageNo=1" -H "x-api-key: ${API_KEY}")

printf '%s' "$HISTORY" | node -e '
  const fs = require("fs");

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes shell tooling (exec, curl, bash, file writes) but does not declare any explicit tool scope or permissions boundary. This increases the chance that an agent will execute powerful commands without clear user/auditor visibility into the skill’s required capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill directs agents to send user research prompts to desearch.zeelin.cn but does not clearly warn users that their inputs and resulting report content are transmitted to an external service. This undermines informed consent and can expose proprietary, personal, or regulated data to a third party.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This command transmits user-provided research content and an API key to an external service. In the context of a research skill this behavior is expected, but it is still security-relevant because sensitive prompts, business data, or personal information may be exfiltrated to a third party.

Content

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

bash
API_KEY="${DESEARCH_API_KEY}"
curl -s -X POST "https://desearch.zeelin.cn/api/conversation/anew" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${API_KEY}" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This example repeats external API submission of user content and credentials during error-handling flows. Repetition across multiple documented flows increases the likelihood that agents will send data externally by default, even when users may not understand the disclosure implications.

Content

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

bash
# 检查返回码
RESULT=$(curl -s -X POST "https://desearch.zeelin.cn/api/conversation/anew" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${API_KEY}" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The full workflow submits user content to the external service, then continues processing based on returned identifiers. This is not inherently malicious, but it is a true external-transmission risk because confidential queries and metadata leave the local trust boundary.

Content

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

bash
# 1. 创建任务
API_KEY="${DESEARCH_API_KEY}"
RESULT=$(curl -s -X POST "https://desearch.zeelin.cn/api/conversation/anew" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${API_KEY}" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The workflow downloads a remote PDF and then forwards it to the user, creating an external-to-local-to-user transfer path. This can expose the environment to untrusted remote content and creates a data-handling chain that is not clearly constrained or sanitized.

Content

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

md
echo "PDF URL: $PDF_URL"

# 4. 下载 PDF 文件
curl -s -o /tmp/research_result.pdf "$PDF_URL"

# 5. 发送 PDF 文件给用户
message action=send target=用户ID filePath=/tmp/research_result.pdf

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This section mandates downloading and sending PDFs, reinforcing a pattern of handling untrusted remote files locally. The danger is elevated by the imperative wording, which pushes agents toward file transfer behavior even when plain-text delivery might be safer or more appropriate.

Content

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

md
PDF_URL=$(echo $REPORT_RESULT | jq -r '.data')

# 下载 PDF 文件
curl -s -o /tmp/research_result.pdf "$PDF_URL"

# 发送 PDF 文件给用户
message action=send target=用户ID filePath=/tmp/research_result.pdf

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This background-processing flow automatically downloads and sends a file after polling completion, reducing human review before transmission. Automation increases the chance of sending unexpected, oversized, or sensitive content without an explicit checkpoint.

Content

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

  1. 任务完成后立即发送:在轮询循环结束后,立即调用 message 工具发送 PDF
    bash
    # 下载 PDF 后立即发送
    curl -s -o /tmp/research_result.pdf "$PDF_URL"
    message action=send target=用户ID filePath=/tmp/research_result.pdf
    

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill extends beyond research generation into external publishing by creating and populating Feishu documents with report contents. That adds a second outbound data sink and can disclose sensitive user prompts or generated reports to another third-party platform without a clear, up-front consent boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Feishu workflow extracts report text from downloaded documents and copies it into Feishu without a clear privacy warning or consent checkpoint. This increases sensitivity because content is not merely delivered as a file; it is transformed and republished into another cloud platform.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This Feishu-specific flow begins with the same external submission of user content to the research service. In this context the risk is compounded because the output is later republished to another service, expanding exposure across multiple external platforms.

Content

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

bash
# 1. 创建任务
API_KEY="${DESEARCH_API_KEY}"
RESULT=$(curl -s -X POST "https://desearch.zeelin.cn/api/conversation/anew" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${API_KEY}" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The skill downloads a remote Word document, unzips it locally, and extracts text for onward publication. Processing remote archives increases risk because malformed or malicious documents can trigger parser issues, overwrite files if extraction is unsafe, or leak sensitive content through intermediary artifacts.

Content

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

md
WORD_URL=$(echo $REPORT_RESULT | jq -r '.data')

# 4. 下载 Word 文件
curl -s -o /tmp/research.docx "$WORD_URL"

# 5. 解压 Word 文件提取文字内容
unzip -q /tmp/research.docx -d /tmp/research_docx/

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

This POST request transmits user-supplied research content and metadata to an external API using an API key. While this appears to be the intended functionality, it is still a genuine external data exfiltration channel from the local environment to a remote service, which is dangerous if users enter sensitive or regulated information.

Content

Scanner excerpt · scripts/research.sh (reported line 48)May include surrounding context.

sh
moreSettings: {}
  }));
' "$THINKING")
RESP=$(curl -s -X POST "${BASE_URL}/api/conversation/anew" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${API_KEY}" \
  -d "$BODY")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script sends the user's research prompt and receives session-linked results from a third-party service, but it does not provide any explicit user-facing warning or confirmation that potentially sensitive research data will leave the local environment. In a research skill, prompts may contain confidential business, legal, market, or proprietary information, so silent transmission creates a real data-disclosure risk even if the behavior is expected by the feature design.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workflow downloads generated reports to local temporary files without clearly warning users that their content will be stored on disk, even if only briefly. Temporary local storage can create residual exposure through shared hosts, logs, backups, or later file access.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

Lines L386-L389 state an absolute rule: do not send text and 반드시 download and send a PDF file. Later, L561-L617 explicitly contradict that instruction for Feishu by forbidding direct PDF delivery and requiring document creation plus link sharing instead. This is an intent/documentation contradiction within the skill guidance.

Content

No source excerpt is available for this finding.