Back to skill

Security audit

Doubao Media

Security checks for vulnerabilities and agentic risk

Overview

The skill’s purpose is coherent, but it handles browser cookies and live web traffic too broadly and stores session data insecurely.

Install only if you are comfortable giving the skill access to an authenticated Doubao browser session and captured network responses. Use a dedicated browser profile, avoid unrelated ByteDance/Douyin logins, inspect or delete the plaintext session file after use, and avoid running download capture on untrusted or mixed browsing traffic.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/doubao_session.js:42
Finding

Broad Browser Cookie Collection and Plaintext Session Storage

Content
View full analysis
c.domain.includes('doubao.com') || c.domain.includes('bytedance') || c.domain.includes('douyin.com') ); if (!dbCookies.length) { throw new Error('No Doubao cookies found. Please open doubao.com in the logged-in browser first.'); } const session = { cookies: dbCookies.map(c => ({ name: c.name, value: c.value })), savedAt: new Date().toISOString(), }; writeSession(session); return session; } ``` ### Technical Analysis The login routine calls `Network.getCookies()` without restricting collection to an exact Doubao URL. It then retains cookies whose domains contain `doubao.com`, `bytedance`, or `douyin.com`. This can collect authentication credentials for a broader collection of services than the Doubao API operation requires. The selected cookie names and values are written to `~/.doubao_chat_session.json` as unencrypted JSON. The call to `fs.writeFileSync` does not explicitly set restrictive file permissions, and the implementation does not use an operating-system credential store. Cookie attributes such as `HttpOnly`, `Secure`, domain scope, path, and expiration are also discarded, making the resulting credential collection a reusable raw cookie string. Although cookie collection is disclosed as part of the Skill's functionality, the s ...[truncated 1355 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/doubao_media_api.js:151
Finding

Unrestricted Download of URLs Extracted from Remote Content

Content
View full analysis
\\]+/g) || []; for (const m of matches) { const cleaned = m.replace(/[),\]]+$/, ''); if (/\.(png|jpg|jpeg|webp|gif|mp4|mov|webm|m3u8|heic)(\?|$)/i.test(cleaned) || /(image|video|poster|cover|play_addr|tos-cn|byteimg)/i.test(cleaned)) { found.add(cleaned); } } return found; } if (Array.isArray(value)) { for (const item of value) collectUrlsDeep(item, found); return found; } if (value && typeof value === 'object') { for (const [k, v] of Object.entries(value)) { if (typeof v === 'string' && /^https?:\/\//i.test(v) && (/(url|uri|video|image|poster|cover|play_addr|src|download)/i.test(k) || /\.(png|jpg|jpeg|webp|gif|mp4|mov|webm|m3u8|heic)(\?|$)/i.test(v))) { found.add(v); } collectUrlsDeep(v, found); } } return found; } ``` Unrestricted downloader and recursive redirect handling: ```js async function downloadFile(url, filePath) { const client = url.startsWith('https:') ? https : http; return new Promise((resolve, reject) => { client.get(url, res => { if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { res.resume(); return resolve(downloadFile(res.headers.location, filePath)); } i ...[truncated 4756 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/package-lock.json:12
Finding

Dependencies Locked to a Third-Party Registry Mirror

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The documented behavior omits or misstates important implementation details, especially dependence on a local Chrome remote debugging port and browser-derived session access. This is dangerous because users may authorize the skill under false assumptions, while the actual behavior can expose browser context, cookies, and network traffic beyond what the description clearly discloses.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly discusses grabbing browser cookies, monitoring network traffic, and downloading assets, yet provides no clear user-facing warning about privacy, credential exposure, or consent boundaries. In this context, the omission is especially dangerous because the skill is designed to interact with authenticated browser sessions and inspect live web traffic, which can expose sensitive tokens, account data, and unrelated browsing information.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 18)May include surrounding context.

md
- `scripts/doubao_media_api.js`:调用 chat/completion,提取并下载图片/视频资产

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 116)May include surrounding context.

md
- `scripts/doubao_media_api.js`:调用 chat/completion,提取并下载图片/视频资产

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 19)May include surrounding context.

md
- `scripts/capture_doubao_media.js`:监听浏览器网络流量,抓最终媒体 URL,适合视频排查

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 117)May include surrounding context.

md
- `scripts/capture_doubao_media.js`:监听浏览器网络流量,抓最终媒体 URL,适合视频排查

Known Vulnerable Dependency: ws==7.5.10 — 1 advisory(ies): CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
93% confidence
Finding

The lockfile pins ws to 7.5.10, which is flagged as affected by a memory-exhaustion denial-of-service issue involving tiny WebSocket fragments and data chunks. Because this skill depends on chrome-remote-interface, which in turn uses ws, a crafted or malicious WebSocket peer could cause excessive memory consumption and crash or hang the process. In this skill’s context—browser remote debugging, SSE capture, and media/network interception—the package participates in long-lived protocol connections, which makes DoS more relevant rather than less.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises capabilities involving browser session reuse, cookie handling, and media capture, but it declares no explicit tool scope or permissions. That makes the operational boundary opaque to users and host systems, increasing the risk that sensitive local environment data or authentication material could be accessed without informed consent or proper sandboxing.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L003 列出的触发场景包括“继续研究豆包 skill”“把豆包生成的图片/视频拿到”“抓豆包网页请求/媒体资源”“提取豆包生成结果”等,属于自然语言描述而非明确、边界清晰的调用条件。其中如“提取豆包生成结果”范围较宽,缺少排除条件或负例,容易覆盖普通讨论或研究请求。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This script captures browser request bodies and response bodies from a live authenticated Doubao session, extracts URLs from them, and writes the resulting records to disk. In this context, network bodies can contain prompts, conversation content, account-linked identifiers, signed media URLs, or other sensitive data, and the tool provides no explicit consent prompt, redaction, or warning before collection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The chat command transmits arbitrary user-supplied prompts together with authenticated Doubao session cookies to https://www.doubao.com, but this file provides no user-facing notice, confirmation, or guardrails before sending potentially sensitive input under the user's authenticated web session. In the context of a media-extraction and web-request-capture skill, this increases the chance that operators unknowingly forward sensitive prompts or leverage privileged cookies in ways they did not fully intend.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The hard-coded request path includes language=zh, which imposes a specific language setting by default. There is no indication in this file that the user can choose or opt into that locale, so it conflicts with the stated language/locale policy requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script persists captured authentication cookies to a predictable local JSON file in the user's profile directory with no protection, expiration handling, or warning. Stored session tokens are effectively bearer credentials, so local malware, another user on the machine, or accidental file sharing could enable unauthorized access to the user's Doubao account or other captured services.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The login helper intentionally captures cookies not only for doubao.com but also for any domain containing bytedance or douyin.com. That broadens credential collection beyond what is needed for a Doubao-only workflow and can sweep in unrelated authenticated session tokens from other services, increasing account-compromise and privacy risk if the session file is accessed or reused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The function sends a network request containing the user's message text and a Cookie header assembled from stored session cookies. For this code file, there is no visible confirmation, print/log statement, or explanatory comment disclosing that user content and authentication data are being sent over the network.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest explicitly advertises chat invocation, media extraction, request monitoring, and downloading of generated assets, but it does not define any scope limits, consent requirements, or operational constraints. In a skill centered on browser-cookie use and capture of web traffic/media, this broad behavior increases the chance of over-collection of sensitive data or unintended surveillance-like use, especially if invoked in environments with other authenticated browser sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The package description and scripts promote packet capture, response interception, and media download, yet provide no user-facing warning about privacy implications, cookie/session sensitivity, or local filesystem side effects. Given the skill's stated purpose of using browser cookies and monitoring generation flows, the absence of warnings and consent language makes accidental collection of private content or authenticated data materially more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This script's natural-language interface is Chinese-only, including the header comment, the keepalive message 你好, and the reply label/output such as 无回复, without any indication that language is configurable or chosen by the user. That can violate language/locale policy when a skill imposes a locale without opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
76% confidence
Finding

Using a caret version for chrome-remote-interface allows automatic adoption of newer minor/patch releases, which can introduce unexpected behavior or supply-chain risk if a compromised or incompatible release is published. While this is not an immediate exploit by itself, the dependency is security-sensitive because it interfaces with Chrome's remote debugging features used for capture and monitoring.

Content

Scanner excerpt · scripts/package.json (reported line 27)May include surrounding context.

json
"author": "小虎",
  "license": "MIT",
  "dependencies": {
    "chrome-remote-interface": "^0.33.3"
  }
}