Back to skill

Security audit

抖音下载器(Node.js)

Security checks for vulnerabilities and agentic risk

Overview

This Douyin downloader mostly matches its stated purpose, but it has review-worthy privacy and credential risks around external transcription, weak URL validation, and use of a generic API key environment variable.

Install only if you are comfortable with a Douyin tool that downloads media locally and sends extracted audio to SiliconFlow for transcription. Use a provider-specific DOUYIN_API_KEY only, avoid running it in environments with unrelated API_KEY secrets, and do not pass untrusted or non-Douyin URLs until hostname validation is tightened.

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

Warning
Location
douyin.js:175
Finding

Server-Side Request Forgery Through Weak Douyin URL Validation

Content
View full analysis
{ const parsedUrl = new URL(url); const client = parsedUrl.protocol === 'https:' ? https : http; const opts = { method: options.method || 'GET', headers: { ...HEADERS, ...options.headers } }; const req = client.request(url, opts, (res) => { ``` ### Technical Analysis The application attempts to determine whether the submitted URL belongs to Douyin by checking whether its complete string contains `douyin.com`. A substring test does not validate the parsed hostname. Consequently, an attacker can submit a URL whose path, query string, or user-information section contains `douyin.com` while the actual destination is another host. For example: ```text http://127.0.0.1:8080/douyin.com ``` This URL satisfies `shareUrl.includes('douyin.com')`, but its destination host is `127.0.0.1`. The `httpRequest` function permits both HTTP and HTTPS and does not reject loopback, private, link-local, or otherwise sensitive destinations. The unsafe fallback request is reached when the initial fixed-domain Douyin metadata request does not produce a valid video object. The response is processed internally rather than directly returned, which limits direct data extraction, but the request can still reach and interact with internal HTTP services. ### Attack Path 1. An attacker supplies a crafted share link containing the text `douyin.com` outside the hostname. 2. `parseShareUr ...[truncated 1156 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
douyin.js:278
Finding

Unrelated Credentials May Be Disclosed Through Generic API_KEY Fallback

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description focuses on watermark-free download and text extraction, but the documented behavior also includes third-party API submission, local media processing with ffmpeg/ffprobe, and creation of output files. This mismatch is security-relevant because users may consent to simple downloading without realizing their media/audio will be processed locally and potentially transmitted to an external transcription provider.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill explicitly relies on environment variables for an external API key, but the manifest does not declare tool scope or permissions that communicate this capability. This weakens transparency and reviewability, making it easier for a user or orchestrator to invoke a skill that accesses sensitive credentials without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The usage guidance instructs users to download videos, write files to local directories, and use an API key for transcription, but it does not warn that audio/video content may be sent over the network to a third party or stored locally. This creates a meaningful privacy and data-handling risk, especially if users process sensitive or copyrighted content without understanding where the data goes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description limits the skill to video downloading and text extraction from Douyin content. However, the documented and implemented behavior includes extracting audio with ffmpeg and sending that audio to an external SiliconFlow transcription API, which is a materially broader workflow than the manifest states.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill transmits user-derived content to an external domain for transcription, which is a real data exposure boundary even if the destination is legitimate. In this context, the danger is not remote code execution but undisclosed outbound transfer of media/audio and associated metadata to a third party.

Content

Scanner excerpt · douyin.js (reported line 34)May include surrounding context.

js
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/121.0.2277.107 Version/17.0 Mobile/15E148 Safari/604.1'
};

const DEFAULT_API_BASE_URL = 'https://api.siliconflow.cn/v1/audio/transcriptions';
const DEFAULT_MODEL = 'FunAudioLLM/SenseVoiceSmall';

// 工具函数:Promise 版本的 http 请求

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The extract workflow uploads locally derived audio content to a third-party transcription service, but the user is not explicitly warned at the point of use that media-derived data will leave the machine. This creates a privacy risk, especially if videos contain sensitive, private, or copyrighted audio, and the skill context makes this more concerning because users may reasonably expect a downloader to operate locally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest only describes a Douyin watermark-free video downloader and copywriting extractor. Pulling credentials from DOUYIN_API_KEY or generic API_KEY to call an external service is a separate capability that is not disclosed in the manifest and broadens the trust boundary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

SQP-3 applies to all file types and includes language/locale policy violations. The visible user-facing description and instructions are presented in Chinese only, with no opt-in, alternative language, or justification that the skill is restricted to a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The transcript metadata uses toLocaleString('zh-CN'), forcing Chinese locale formatting regardless of user preference. This is a natural-language/locale policy concern because the file does not provide opt-in, fallback behavior, or justification for restricting output locale.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
douyin.js:134