Back to skill

Security audit

doubaoimg

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent image-saving purpose, but it uses unsafe browser-script and file-write patterns that deserve review before installation.

Review this skill before installing. It is not clearly malicious, but only use it with prompts and output paths you trust, avoid running it in a privileged account, and prefer a version that passes prompt/path values as data arguments and restricts downloads to a dedicated image folder without overwriting existing 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:45
Finding

User-Controlled Prompt Interpolation into Browser JavaScript

Content
View full analysis
{ const ta = document.querySelector('textarea'); if (!ta) return { ok: false, reason: 'no textarea' }; const text = 'PROMPT_HERE'; const setter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, 'value').set; setter.call(ta, text); ta.dispatchEvent(new Event('input', { bubbles: true })); ta.dispatchEvent(new Event('change', { bubbles: true })); return { ok: true, valueLength: ta.value.length }; } ``` ### Technical Analysis The skill instructs the agent to replace `PROMPT_HERE` with the image prompt and execute the resulting source using browser `evaluate`. The prompt is placed inside a single-quoted JavaScript string without requiring escaping, serialization, or argument binding. A malicious prompt containing a single quote followed by JavaScript syntax can terminate the intended string and inject additional statements. The injected code would execute in the context of the authenticated Doubao page. For example, a prompt shaped like the following could escape the string if inserted verbatim: ```text '; /* attacker-controlled JavaScript */ // ``` The precise capabilities of injected code depend on the browser automation environment and Doubao's page security controls. It could access page-visible content, inspect conversations rendered in the DOM, initiate same-origin actions, or send browser requests. Cookies protected with `HttpOnly` would not be directly readable, but the active authenticated session could still potentially be abused through same-origin requests. ### Attack Path 1. An attacker supplies or influences the image-generation prompt. 2. The agent follows the documented fallback and substitutes the prompt directly for `PROMPT_HERE`. 3. The prompt closes the single-quoted JavaScript string and ap ...[truncated 951 chars]
Remediation
View remediation
{ const ta = document.querySelector('textarea'); if (!ta) return { ok: false, reason: 'no textarea' }; const setter = Object.getOwnPropertyDescriptor( window.HTMLTextAreaElement.prototype, 'value' ).set; setter.call(ta, prompt); ta.dispatchEvent(new Event('input', { bubbles: true })); ta.dispatchEvent(new Event('change', { bubbles: true })); return { ok: true, valueLength: ta.value.length }; } ``` - If argument passing is unavailable, serialize the value with a trusted serializer such as `JSON.stringify` before constructing the expression. Do not implement ad hoc quote escaping. - Explicitly state in the skill instructions that user input must never be substituted directly into JavaScript, PowerShell, Python, shell, or other executable source. - Add test cases containing quotes, backslashes, newlines, template-literal characters, and JavaScript fragments to verify that prompts remain data rather than code. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:161
Finding

Unrestricted Caller-Controlled Output Path Allows File Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs the agent to write files to local disk, including a default path under the user's workspace, without requiring explicit confirmation at the time of the write. While saving an image is core to the skill's stated purpose, silent filesystem writes can still surprise users, overwrite expected locations, or create unintended local artifacts if the output path is inferred automatically.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.