Back to skill

Security audit

qwen-omni-multimodal

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its stated Qwen multimodal purpose, but it can send API credentials and private media to a user-configurable endpoint without destination validation.

Review before installing. Prefer DASHSCOPE_API_KEY from your environment or a secret manager rather than config.json, keep config files out of source control, and only use the official DashScope HTTPS endpoints unless you intentionally trust a custom endpoint. Avoid sending sensitive media or prompts unless you are comfortable with remote Alibaba Cloud processing and local session retention.

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
scripts/qwen-omni-chat.js:1674
Finding

Unrestricted API endpoint can receive the API credential and private multimodal content

Content
View full analysis

Vulnerability Details

File Location: scripts/qwen-omni-chat.js:1483-1489 and scripts/qwen-omni-chat.js:1674-1677
Vulnerability Type: Unvalidated credential-bearing network destination
Risk Level: High

Vulnerable Code

js
const response = await fetch(`${baseUrl}/chat/completions`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
});
js
const baseUrl = String(
  firstNonEmpty(process.env.DASHSCOPE_BASE_URL, config.baseUrl, DEFAULT_BASE_URL)
).replace(/\/$/, '');
const apiKey = firstNonEmpty(process.env.DASHSCOPE_API_KEY, config.apiKey);

Technical Analysis

The request destination is obtained from either DASHSCOPE_BASE_URL or the local configuration without validating its scheme or hostname. The same destination is then sent an Authorization: Bearer header containing the DashScope API key.

The request body can contain:

  • User prompts and optional system prompts
  • Local images, audio, video, or video frames encoded as Data URLs
  • Active conversation history
  • Earlier conversation summaries
  • Model and output configuration

Consequently, a malicious or accidentally modified environment or config.json can redirect credentials and private content to an arbitrary server. The implementation also does not require HTTPS, so a configured HTTP endpoint could expose the credential and request content to network interception.

Network access is necessary for the Skill's declared cloud-model functionality. However, sending the DashScope credential to an unrestricted destination exceeds the minimum privilege required to communicate with the documented Alibaba Cloud service.

Attack Path

  1. An attacker with influence over the process environment, deployment configuration, or project-local config.json sets DASHSCOPE_BASE_URL or baseUrl to an attacker-controll ...[truncated 1085 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse the endpoint with new URL() before making a request.
  2. Require the https: scheme and reject plaintext HTTP.
  3. Allowlist the documented DashScope hosts, such as:
    • dashscope.aliyuncs.com
    • dashscope-intl.aliyuncs.com
  4. Reject URLs containing embedded credentials, unexpected ports, or unapproved hostnames.
  5. If custom compatible endpoints must be supported, require an explicit command-line opt-in and interactive confirmation before transmitting credentials or user content.
  6. Use separate credentials for custom endpoints rather than automatically forwarding DASHSCOPE_API_KEY.
  7. Clearly display the validated destination hostname before sending sensitive content.
  8. Add automated tests covering HTTP URLs, deceptive subdomains, user-information prefixes, malformed URLs, and attacker-controlled hosts.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:25
Finding

Plaintext API-key storage is supported and recommended without permission safeguards

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:25-39, scripts/qwen-omni-chat.js:383-390, and scripts/qwen-omni-chat.js:1677
Vulnerability Type: Insecure local secret storage
Risk Level: Medium

Vulnerable Documentation and Code

json
{
  "apiKey": "sk-xxx",
  "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
  "selectionPolicy": "auto",
  "defaultModel": "qwen3.5-omni-flash",
  "modelCandidates": [
    "qwen3.5-omni-flash",
    "qwen3.5-omni-plus"
  ]
}
js
function loadConfig() {
  if (!fs.existsSync(CONFIG_PATH)) {
    return {};
  }

  try {
    const raw = fs.readFileSync(CONFIG_PATH, 'utf8');
    const parsed = JSON.parse(raw);
    return parsed && typeof parsed === 'object' ? parsed : {};
  } catch (error) {
    throw new Error(`读取配置文件失败: ${CONFIG_PATH}\n${error.message}`);
  }
}
js
const apiKey = firstNonEmpty(process.env.DASHSCOPE_API_KEY, config.apiKey);

Technical Analysis

The setup documentation presents project-local config.json as an accepted location for a live API key. The implementation then reads the key directly from that plaintext JSON file.

No safeguards verify that the file is owned by the current user or has restrictive permissions. The audited package also does not contain a .gitignore rule protecting config.json. As a result, users following the documented setup may leave the credential readable by other local users or accidentally include it in source control, backups, archives, or redistributed project copies.

Supporting environment variables is appropriate and is already the higher-priority credential source. The insecure aspect is recommending persistent plaintext storage without accompanying access-control enforcement or leakage prevention.

Attack Path

  1. A user follows the documented setup and stores a live API key in config.json.
  2. The file is created with permissions that ...[truncated 764 chars]
Remediation
View remediation

Remediation Suggestions

  1. Make environment variables or an operating-system secret manager the recommended credential mechanism.
  2. Remove plaintext apiKey storage from the default setup example, or mark it clearly as a discouraged compatibility option.
  3. Add config.json and other secret-bearing local files to .gitignore.
  4. On POSIX systems, inspect the file owner and mode before reading it and reject files accessible by group or other users.
  5. If file-based storage remains supported, create the file with mode 0600 and document the required command:
    bash
    chmod 600 config.json
    
  6. Separate non-sensitive configuration from secrets so ordinary configuration files do not need to contain credentials.
  7. Recommend short-lived or narrowly scoped credentials where the service supports them.
  8. Add secret-scanning checks to development and release workflows to prevent accidental key publication.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (23)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
主要脚本:`node scripts/qwen-omni-chat.js`

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes external services using an API key and network access, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization/transparency gap: a host agent or user may not realize the skill can read credentials from the environment and send user content to a remote API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill handles sensitive multimodal inputs and session history, yet the description does not clearly warn that prompts, images, audio, video, and retained conversation context may be transmitted to Alibaba Cloud. This can lead to unintentional disclosure of private or regulated data because users may assume processing is local or ephemeral.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file explains that the skill authenticates with DASHSCOPE_API_KEY, supports reading credentials from local config.json, and sends standard messages plus local file content/Base64 data to a remote endpoint. It describes the mechanics, but does not include an explicit user warning that prompts, local media, session history, and related data may be transmitted to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persists prompts, assistant responses, transcripts, usage, and output audio paths to local JSON session files when sessions are used, without any explicit warning about local retention. This can expose sensitive user content to other local users, backups, endpoint tooling, or later unintended disclosure, especially because multimodal conversations may include transcribed private audio or summaries of private media.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends user-supplied text and multimodal content to a remote DashScope API, including local files that are transparently converted to data URLs and uploaded. Users may provide sensitive images, audio, or video without realizing those contents leave the local environment, creating a meaningful data disclosure risk in a multimodal analysis skill where sensitive media is especially likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The setup recommends placing the API key in config.json without warning about the risk of storing secrets in plaintext on disk. This increases the chance of credential leakage through source control, backups, shared directories, or local compromise.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document is written as Chinese-only guidance beginning with 官方文档: and all operational instructions are presented in Chinese, with no indication that users may choose another language. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a multimodal skill for understanding text/images/audio/video and producing text or speech output. In addition to inference, this script creates, lists, shows, saves, and deletes local session records containing prompts, media references, responses, usage, and output file paths under a sessions directory, which is extra behavior not described in the manifest.

Content

No source excerpt is available for this finding.