Back to skill

Security audit

QQBot Media Sender

Security checks for vulnerabilities and agentic risk

Overview

This QQ media skill needs review because its code does not match its promises and its raw media tags could expose unintended local files if a QQBot runtime interprets them.

Install only if you understand that this package appears to prepare or print QQ media tags rather than reliably sending through a scoped QQ API. Avoid using it on sensitive workspaces or untrusted directories, and do not rely on its group, compression, or max-size options until those behaviors are implemented and the tag injection issue is fixed.

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
sender.js:69
Finding

Unescaped File Path Allows QQ Media-Tag Injection

Content
View full analysis
${absPath}`; } ``` ### Technical Analysis `generateTag()` places an attacker-influenced filesystem path directly inside a QQ media tag without rejecting or escaping markup characters. Unix filesystem names can contain characters such as `<`, `>`, and newlines. If the command output is consumed by a QQBot or agent runtime that interprets ``, ``, or related tags, a crafted path can close the original tag and introduce additional tags. This changes the output from a reference to one selected file into instructions to process other local paths. For example, an attacker can construct nested directories whose names contain closing and opening tags. Directory separators in the resulting absolute path can then form an injected absolute path: ```text /tmp/x/etc/passwd/payload.txt ``` The resulting output can contain an independently interpreted tag equivalent to: ```text /etc/passwd ``` The vulnerability is in tag generation itself. Successful disclosure depends on the surrounding runtime interpreting the printed tags, as described by the skill documentation. ### Attack Path 1. An attacker creates a nested path containing QQ closing and opening tag syntax. 2. The attacker convinces a user or automated agent to process that path, or places it in a directory subsequently scanned by the skill. 3. `sendFile()` passes the path to `generateTag()`. 4. `generateTag()` resolves the path but does not remove tag delimiters or control characters. 5. The script prints the resulting injected tag through `console.log()`. 6. A surrounding QQBot or agent runtime interpret ...[truncated 729 chars]
Remediation
View remediation
` - `<` and `>` - Newline and carriage-return characters - Symlinks targeting files outside the approved root 8. Ensure the consumer treats command output as plain status text unless a separately authenticated, validated media-send operation is requested. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documentation claims capabilities that are not actually implemented, including real QQ transmission, automatic compression, configurable size enforcement, and group targeting. This is dangerous because users may trust the skill to handle file transfer controls or destination selection safely when it does not, leading to accidental disclosure, failed delivery assumptions, or misuse in workflows that depend on those protections.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest and module header describe a skill that sends images/videos/files to QQ, including batch sending. In practice, sendFile only checks file existence and size, generates a <qqimg>/<qqvideo>/<qqfile> tag, logs it, and returns metadata; there is no QQ API call, client integration, or message dispatch anywhere in the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly promotes sending local images, videos, files, and even workspace documents to QQ chats, but it provides no warning that this action transfers potentially sensitive local data to an external messaging platform. In a tool designed for one-click and batch media sending, the lack of disclosure and safety guidance increases the risk of accidental exfiltration of private or confidential files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill encourages transmitting local files to QQ chats or groups, including workspace and /tmp examples, but does not warn users that sensitive local data may be sent off-host. In an agent context, this omission increases the risk of unintentional exfiltration of documents, screenshots, or temporary files that may contain secrets or personal data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language description at L004 and the surrounding CLI help strings in the file are presented only in Chinese, which implies a fixed language experience. Under the stated policy, forcing a specific language without user opt-in is a locale/language policy violation unless the tool is explicitly documented as region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says the skill supports '自动压缩', and the CLI exposes a --compress option, but no code path uses options.compress to compress files. Oversized files are simply rejected by checkFileSize instead of being compressed automatically.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CLI documentation explicitly says --compress will '压缩大文件', which implies a behavior users can rely on. No compression is implemented anywhere; instead, files over the fixed limit trigger an error in checkFileSize, so the documentation contradicts runtime behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

All user-facing instructions and descriptions in the file are written in Chinese, with no note that the skill is Chinese-only or any option for another language. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language policy issues apply to all file types, including markdown. Here the user-facing description and instructions force a single language/locale experience without opt-in or justification, which can violate organizational language-choice policies.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.