Back to skill

Security audit

苏诺之音-SunoAI音乐助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for Suno.cn music generation, but its helper can send credentials and uploaded files to any service endpoint set through an environment variable.

Install only if you trust the publisher and your agent environment. Do not set SUNO_CN_MCP_URL or SUNO_CN_CONFIG_DIR unless you intentionally use a trusted test setup, review credit-consuming actions before confirming retries, and use auth logout or Suno.cn authorization management to revoke access when finished.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/suno-client.mjs:12
Finding
Unrestricted Service Endpoint Override Can Expose Credentials and Uploaded Files## Vulnerability Details **File Location**: `scripts/suno-client.mjs:12-13, 145, 182, 310, 353, 419, 447-452` **Vulnerability Type**: Unvalidated security-sensitive endpoint override **Risk Level**: High ### Vulnerable Code ```js const DEFAULT_BASE_URL = "https://mcp.suno.cn"; const BASE_URL = (process.env.SUNO_CN_MCP_URL || DEFAULT_BASE_URL).replace(/\/+$/, ""); ``` ```js async function fetchResponse(path, options = {}) { const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), options.timeout || 30_000); try { const response = await fetch(`${BASE_URL}${path}`, { ...options, signal: controller.signal }); ``` ```js async function querySkillStatus(credentials) { return fetchJSON("/mcp/auth/status", { method: "GET", headers: { Authorization: `Bearer ${credentials.skill_key}` }, }); } ``` ```js body: JSON.stringify({ skill_key: credentials.skill_key, client_instance_id: credentials.client_instance_id, client_name: CLIENT_NAME, skill_version: SKILL_VERSION, }), ``` ```js const credential = await resolveBusinessCredential(); const headers = { Authorization: `Bearer ${credential.value}` }; ``` ```js await fetchJSON("/mcp/auth/binding", { method: "DELETE", headers: { Authorization: `Bearer ${skillKey}` }, }); ``` ```js const absolutePath = resolve(filePath); let data; try { data = await readFile(absolutePath); } catch { throw new ClientError("file_not_found", "Unable to read the upload file"); } const form = new FormData(); form.append("file", new Blob([data]), basename(absolutePath)); ``` ### Technical Analysis The helper accepts `SUNO_CN_MCP_URL` as the base URL for all remote requests without validating its scheme, hostname, port, or origin. The same generic request function is then used for authorization, account operations, business requests, logout, and file uploads. Consequently, setting this environment variable to an attacker-controlled URL redirects the following security- ...[truncated 2591 chars]
Remediation
## Remediation Suggestions 1. **Pin the production origin** - In normal operation, require the exact origin `https://mcp.suno.cn`. - Reject URLs containing alternate schemes, credentials, unexpected ports, fragments, or unapproved hosts. 2. **Parse and validate the URL** - Use `new URL()` rather than string concatenation. - Require `https:`. - Compare `url.origin` against an explicit allowlist. 3. **Separate development and production modes** - Permit endpoint overrides only when an explicit development-mode flag is enabled. - Do not allow production Skill Keys or legacy API keys to be sent in development mode. - Use separate test credentials for approved staging origins. 4. **Protect sensitive operations** - Refuse authentication, account access, logout, and file uploads when the effective origin is not the official production origin unless the user explicitly approves a recognized staging environment. - Display the effective non-default origin before any credential or file transmission. 5. **Prevent plaintext transmission** - Reject all `http://` endpoints, including localhost exceptions unless a narrowly scoped development mode explicitly requires them and no production credentials are present. 6. **Construct request URLs safely** - Resolve API paths against the validated base URL and verify that the resulting URL retains the approved origin before calling `fetch`. A suitable production policy would resemble: ```js const PRODUCTION_ORIGIN = "https://mcp.suno.cn"; const candidate = new URL(process.env.SUNO_CN_MCP_URL || PRODUCTION_ORIGIN); if (candidate.protocol !== "https:" || candidate.origin !== PRODUCTION_ORIGIN) { throw new Error("Unapproved Suno.cn service origin"); } const BASE_URL = candidate.origin; ``` If staging support is required, use a hardcoded allowlist and distinct non-production credentials rather than accepting an arbitrary environment-provided destination.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill instructs the agent to execute local shell commands (`node scripts/suno-client.mjs ...`) but does not declare corresponding permissions. Undeclared execution capability weakens the host's trust and review model because users may not realize the skill can run commands and access local files as part of its workflow.

Tp4

High
Category
MCP Tool Poisoning
Confidence
81% confidence
Finding
The skill is presented primarily as a music-generation assistant, but the documentation also establishes installation behavior involving copying files into an agent skill directory and changing file permissions. That mismatch can conceal broader filesystem-modifying behavior from users and reviewers, increasing the risk of unintended persistence or unauthorized local changes.

Session Persistence

Medium
Category
Rogue Agent
Content
display_name: Suno.cn AI 音乐助手
display_name_en: Suno.cn AI Music Assistant
description_zh: Suno.cn AI 音乐创作助手,支持 AI 作曲写歌、文字生成歌曲、歌词生成、参考音频翻唱与续写、添加人声或伴奏、纯音乐与 BGM 生成、人声及音轨分离、音频降噪裁剪合并、音质提升、WAV 转换、音频转 MIDI、MIDI 转乐谱 PDF,以及作品和积分查询。首次使用通过网页确认三天授权,无需手填 API Key;部分功能消耗账户积分。
description_en: Suno.cn AI music and song generator for AI agents. Create songs from text or lyrics, write lyrics, make instrumental music and background music (BGM), cover or extend reference audio, and add vocals, accompaniment or stems. Supports vocal and stem separation, audio denoising, trimming, merging, quality enhancement, WAV conversion, audio-to-MIDI, MIDI-to-PDF sheet music, and music library and credit queries. Uses three-day web authorization without manual API key entry. Some operations consume account credits.
summary: Suno.cn AI 音乐创作助手:文字生成歌曲、AI 作曲写歌、歌词生成、参考音频翻唱与续写、纯音乐和伴奏生成、人声分离、音频降噪、MIDI 与乐谱转换。支持 Agent 网页授权接入。
homepage: https://www.suno.cn
tags: [AI音乐, AI作曲, AI写歌, 歌词生成, AI翻唱, 歌曲续写, BGM, 伴奏生成, 人声分离, 音频处理, MIDI, Suno]
Confidence
76% confidence
Finding
The skill uses a three-day web authorization and stores local state for ongoing access, which creates a persistent session token on the machine. Persistent authorization increases exposure if the host or local account is compromised, especially because the skill can perform credit-consuming operations and access user account resources during the authorization window.

Static analysis

Detected: suspicious.env_credential_access, suspicious.potential_exfiltration

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/suno-client.mjs:13

Sensitive-looking file read is paired with a network send.

Warn
Code
suspicious.potential_exfiltration
Location
scripts/suno-client.mjs:61