Back to skill

Security audit

Grab Douyin - Video Downloader

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real Douyin downloader, but it can use a stored API token and make network requests from overly broad triggers.

Install only if you are comfortable with the agent sending Douyin video IDs and your TikHub bearer token to TikHub. Avoid letting it process untrusted text automatically, and prefer explicit confirmation before lookups or downloads until the trigger rules and short-link validation are tightened.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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

Warning
Location
scripts/douyin_download.py:68
Finding

Unrestricted short-link resolution permits SSRF-style network requests

Content
View full analysis
str: """ Follow redirects on a v.douyin.com short link and return the final URL. This is needed because short links don't embed the modal_id directly. """ try: resp = requests.head(url, allow_redirects=True, timeout=10) return resp.url except requests.RequestException as e: raise ValueError(f"Could not resolve short link '{url}': {e}") from e ``` ```python # 4. Short link — resolve then retry if "v.douyin.com" in text: resolved = resolve_short_link(text) if resolved != text: return extract_modal_id(resolved) ``` ### Technical Analysis The program treats an input as a Douyin short link whenever the unparsed string contains `v.douyin.com`. This is a substring check rather than validation of the URL's actual hostname. Consequently, an attacker can place that string in a query parameter, path, user-information component, or fragment while directing the request to another host. For example, the following input passes the check but targets a loopback service: ```text http://127.0.0.1:8080/probe?v.douyin.com ``` The call to `requests.head()` then executes using the network privileges of the host running the Skill. Moreover, `allow_redirects=True` follows redirects without checking the scheme, hostname, resolved IP address, or each destination in the redirect chain. Although the implementation does not return the response body, request errors, redirects, and timing can expose service availability. A HEAD request may also cause side effects in incorrectly implemented internal services. ### Attack Path 1. An attacker places a crafted URL in content processed as the Skill's input. 2. The URL includes the literal string `v.douyin.c ...[truncated 1219 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Note
Location
SKILL.md:13
Finding

Skill instructions trigger authenticated third-party requests without explicit user intent

Content
View full analysis
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 (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description says 'no login required' but operationally requires a TikHub API token, and it presents itself as a downloader even though default behavior may only return a URL. This mismatch can mislead users and orchestrators about data flow, credentials required, and whether files will actually be written to disk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill performs network-backed actions via an external API but does not declare any explicit tool scope or permissions boundary. This increases the chance of unintended or opaque network access during invocation, making review, sandboxing, and user consent weaker.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger rules are overly broad, including phrases like 'save this video' and automatic invocation whenever a Douyin URL or numeric ID is merely present. That can cause the skill to activate without clear user intent, leading to unsolicited external API calls or file downloads.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill omits a prominent user-facing warning that it uses a third-party API token/service and may download files to local storage. Without clear disclosure, users may unknowingly cause credentialed API use, external data sharing, or persistent writes to disk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/douyin_download.py (reported line 27)May include surrounding context.

python
# Constants
# ---------------------------------------------------------------------------

TIKHUB_API_URL = "https://api.tikhub.io/api/v1/douyin/web/fetch_one_video"
DEFAULT_OUTPUT_DIR = os.path.expanduser("~/Downloads/douyin")

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code extracts and prints a direct Douyin playback URL from the third-party API response, which expands the skill from simple downloading into link-unlocking/redistribution functionality. In an agent setting, exposing the raw media URL can bypass expected guardrails, enable downstream reuse outside the downloader, and make it easier to automate bulk retrieval or sharing of direct media endpoints.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description presents the skill as a downloader and the usage guidance says to always use it when given a Douyin URL or video ID. However, the implemented default behavior is non-downloading: it fetches and prints the direct media URL, and only writes the file when the optional --download flag is set. That is a meaningful behavior mismatch because the skill exposes a URL-resolution capability not reflected in the stated purpose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.