Back to skill

Security audit

WhatsApp GIF工具

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly for WhatsApp GIF handling, but it mixes in unrelated SEO triggers and uses broad command/file operations to download and convert external media.

Review this skill before installing. Use it only for explicit WhatsApp GIF tasks, avoid unrelated SEO workflows, and do not run the example commands as a privileged user. Prefer a private temporary directory and verify media URLs before downloading or converting files.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:160
Finding

Predictable Shared Temporary Files Permit Symlink Attacks

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 160–162
Vulnerability Type: Unsafe temporary-file handling
Risk Level: Medium

Vulnerable Code

bash
curl -sL "https://media.tenor.com/详情见说明.gif" -o /tmp/g.gif && \
ffmpeg -i /tmp/g.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" /tmp/g.mp4 -y 2>/dev/null && \
cp /tmp/g.mp4 /root/.skill-platform/workspace/g.mp4

Technical Analysis

The documented workflow uses the fixed, predictable paths /tmp/g.gif and /tmp/g.mp4 in a commonly shared temporary directory. It neither creates these files atomically nor verifies that they are regular files owned by the invoking user.

Both curl -o and FFmpeg with -y overwrite their destinations. On systems where symbolic-link protections are absent or ineffective for the execution context, another local user can pre-create one of these paths as a symbolic link. The invoked utility may then follow that link and overwrite its target.

The final destination under /root suggests that the workflow may be run with elevated privileges. Running it as root would increase the seriousness of a successful temporary-file attack. This finding concerns the documented execution path; the project contains no executable implementation proving that the commands are automatically run as root.

Attack Path

  1. An attacker with local access predicts that the Skill will use /tmp/g.gif and /tmp/g.mp4.
  2. Before invocation, the attacker creates one of those paths as a symbolic link to a file writable by the Skill's execution identity.
  3. A privileged or otherwise higher-authority agent runs the documented command sequence.
  4. curl or FFmpeg follows the crafted path while overwriting its output.
  5. The linked target is modified with downloaded or converted media data. Alternatively, an attacker able to replace /tmp/g.mp4 between conversion and copying may cause attacker-controlled content to be copied into the worksp ...[truncated 735 chars]
Remediation
View remediation

Remediation Suggestions

  • Create a private temporary directory atomically instead of using fixed names:
bash
tmp_dir="$(mktemp -d)" || exit 1
chmod 700 "$tmp_dir"
trap 'rm -rf -- "$tmp_dir"' EXIT

gif_file="$tmp_dir/input.gif"
mp4_file="$tmp_dir/output.mp4"

curl --fail --show-error --location \
  "https://media.tenor.com/DETAILS.gif" \
  --output "$gif_file" &&
ffmpeg -nostdin -i "$gif_file" \
  -movflags faststart \
  -pix_fmt yuv420p \
  -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" \
  "$mp4_file" &&
install -m 0600 -- "$mp4_file" /root/.skill-platform/workspace/g.mp4
  • Execute the conversion with a dedicated, unprivileged account. Avoid writing to /root; use a workspace owned by that account.
  • Before consuming or copying an artifact, verify that it is a regular file, resides inside the private temporary directory, and is not a symbolic link.
  • Avoid suppressing FFmpeg diagnostics during security-sensitive processing so failures remain visible.
  • Apply resource limits and validate downloaded media before conversion to reduce exposure to malformed or excessively large files.
  • If concurrent runs are expected, use a unique output name per invocation and publish the final artifact with an atomic rename inside the destination filesystem.
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 (5)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a WhatsApp GIF tool but also advertises unrelated SEO and ranking capabilities, creating a mismatch between declared purpose and likely activation context. This ambiguity can cause the skill to be invoked in inappropriate workflows, increasing the chance that media download, file conversion, and command execution features run under false pretenses.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

An ambiguous invocation description weakens policy and user understanding of when the skill should run. In this skill, that matters more because the documented workflow includes external content retrieval and local command execution, so misrouting requests into this skill could cause unintended downloads or processing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document claims Chinese interaction plus SEO/ranking/traffic-optimization capabilities even though the operational content is about searching, downloading, converting, and sending GIFs on WhatsApp. This kind of scope confusion is dangerous because users or orchestration agents may grant the skill access or trigger it for unrelated tasks, masking what it actually does.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Overly broad activation guidance encourages use whenever a user provides generic target data and configuration, without clear constraints on approved operations. Because the skill has exec/read/write capabilities and handles external media, loose trigger rules increase the risk of accidental or unsafe execution in contexts the user did not intend.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples show downloading remote media with curl, converting it with ffmpeg, and copying output into the workspace, but the skill does not prominently warn users about the security implications of processing untrusted external files. This is more dangerous in context because the skill explicitly exposes exec/write capabilities, so users may unknowingly ingest malicious or policy-violating content into the local environment.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.