Back to skill

Security audit

ZeeLin 微博自动发布

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it posts from a logged-in Weibo account using unsafe command handling and leaves browser snapshots in a predictable temp file.

Review before installing. Only use this skill when you intend the agent to publish to your logged-in Weibo account, and do not let untrusted text be passed as the post body until the command invocation is made safe. The publisher should add final user confirmation, safe argument passing, and private temporary snapshot handling.

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:40
Finding

Shell Command Injection Through Documented User-Content Interpolation

Content
View full analysis
\"", "timeout": 60000}} ``` ### Technical Analysis The documented workflow constructs a shell command as one string and places user-controlled post content between double quotes. Double quotes do not safely isolate arbitrary data from shell syntax. An attacker can include a double quote to terminate the intended argument and then append shell operators and commands. The quoting inside `post_weibo.sh` does not mitigate this issue because command parsing and injection occur in the parent shell before the script starts. Although the displayed placeholder above is translated into English to satisfy the report language requirement, its position corresponds directly to the post-content placeholder at line 43. For example, malicious post content shaped like the following could escape the quoted argument: ```text normal post"; attacker-command; # ``` The resulting shell command would execute both the publishing script and the injected command under the identity of the process running the Agent. ### Attack Path 1. An attacker supplies a Weibo post body containing a closing double quote, shell separators, and an additional command. 2. The Agent follows the Skill documentation and interpolates that body directly into the `command` string. 3. The execution tool passes the constructed string to a shell. 4. The shell treats the injected separators as command syntax rather than post content. 5. The injected command executes with the filesystem, network, and process privileges available to the Agent account. ### Impact Assessment Successful exploitation provides ...[truncated 419 chars]
Remediation
View remediation
" ] ``` - If the execution interface only accepts shell strings, pass the content through standard input or a securely created file rather than embedding it in the command. - As a last resort, apply a well-tested shell-argument escaping function to the complete value. Do not rely on surrounding the value with double quotes. - Update all documentation examples to demonstrate the safe invocation mechanism. - Add regression tests using post content containing double quotes, command substitutions, semicolons, backticks, newlines, and redirection operators. - Keep execution under a minimally privileged account to reduce the impact of any future command-construction defect. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/post_weibo.sh:10
Finding

Predictable Temporary Snapshot File Permits Symlink Overwrite and Information Disclosure

Content
View full analysis
/dev/null) echo "$SNAP" > "$SNAP_DEBUG" ``` The same path is subsequently reused for append operations: ```bash echo "$SNAP" >> "$SNAP_DEBUG" ``` ### Technical Analysis The script stores a browser accessibility snapshot at the fixed, predictable path `/tmp/weibo_snap.txt`. It does not create the file atomically, verify its ownership, reject symbolic links, enforce restrictive permissions, or remove it after execution. Shell redirection follows symbolic links. On a multi-user system, another local user may pre-create the predictable path as a symbolic link to a file writable by the Agent account. When the Skill executes, the initial redirection truncates and overwrites that target. The append operation follows the same unsafe path. The snapshot can also contain private information visible on the authenticated Weibo page, such as account identifiers, feed text, interface state, or draft-related content. The file's effective permissions depend on the process umask, and the snapshot remains on disk after execution. The `SNAP_DEBUG` environment override expands the scope of possible targets if an untrusted party can influence the execution environment. Environment configuration should therefore be treated as trusted input or constrained to an approved directory. ### Attack Path 1. A local attacker predicts the default path `/tmp/weibo_snap.txt`. 2. Before the Skill runs, the attacker creates that path as a symbolic link to another file writable by the Agent account. 3. The Skill captures the authenticated Weibo page snapshot. 4. The command `echo "$SNAP" > "$SNAP_DEBUG"` follows the symbolic link and truncates or overwrites the linked target. 5. Later snapshots are appended through the same link. ...[truncated 804 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

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.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes local shell execution and relies on browser/network interaction, but it does not declare any explicit tool scope or allowed-tools boundaries. That weakens policy enforcement and makes it easier for an agent runtime to grant broader capabilities than necessary, increasing the chance of unintended command execution or data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad and map to common user requests, which can cause the skill to activate in situations where the user did not clearly consent to local automation and posting actions. In this context, accidental activation is more dangerous because the skill can publish content on the user's behalf using an already logged-in browser session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill does not clearly warn the user that it will run a local shell command and automate actions in a logged-in browser session to publish a post. That reduces informed consent and increases the risk of users authorizing behavior with significant account-impacting side effects without understanding the execution model.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation instructs the agent to use arbitrary shell execution via exec with user-influenced content embedded into a command line. Even if the intended script is benign, using a general shell wrapper is broader than necessary and can enable command injection, unsafe argument handling, or execution of modified local scripts.

Content

No source excerpt is available for this finding.

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · scripts/cdp_weibo_ops.py (reported line 22)May include surrounding context.

python
def list_tabs(p: int):
    with urllib.request.urlopen(f"http://127.0.0.1:{p}/json", timeout=8) as r:
        return json.loads(r.read())

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · scripts/cdp_weibo_ops.py (reported line 28)May include surrounding context.

python
def list_tabs(p: int):
    with urllib.request.urlopen(f"http://127.0.0.1:{p}/json", timeout=8) as r:
        return json.loads(r.read())

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · scripts/cdp_weibo_publish.py (reported line 22)May include surrounding context.

python
def list_tabs(p: int):
    with urllib.request.urlopen(f"http://127.0.0.1:{p}/json", timeout=8) as r:
        return json.loads(r.read())

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · scripts/cdp_weibo_publish.py (reported line 28)May include surrounding context.

python
def list_tabs(p: int):
    with urllib.request.urlopen(f"http://127.0.0.1:{p}/json", timeout=8) as r:
        return json.loads(r.read())

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script performs a real-world irreversible action by automatically clicking the publish control or sending a publish hotkey without any explicit user confirmation immediately before submission. In this skill’s context, the agent is operating a logged-in social media session, so a selector mismatch, UI change, or prompt injection in the page could cause unintended public posting from the user’s account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

All user-facing messages, usage text, and platform assumptions are fixed to Chinese, with no opt-in or alternative locale handling. Under the policy, forcing a specific language without user choice is a natural-language locale violation unless clearly documented as region-specific and justified.

Content

No source excerpt is available for this finding.