Back to skill

Security audit

YouTube Music ULTRA

Security checks for vulnerabilities and agentic risk

Overview

This YouTube Music skill mostly matches its stated purpose, but unsafe command construction and shared cache files create a real local command-execution risk from crafted inputs.

Install only after review or remediation. The main concerns are not hidden exfiltration or destructive intent, but unsafe shell command construction, broad natural-language activation, and shared /tmp caching. The scripts should use argument-array process execution, strict YouTube URL/video-ID validation, private per-user cache storage, and clearer activation rules before normal use.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/control.js:15
Finding

Shell Command Injection Through User-Controlled Browser URLs

Content
View full analysis
`--${k}="${v}"`) .join(' ')}`; return execSync(cmd, { encoding: 'utf8' }); } catch (error) { console.error('Browser action failed:', error.message); throw error; } } ``` The `play` function passes a user-controlled URL to this command-construction function: ```js async function play(query) { ensureBrowser(); if (query.includes('youtube.com') || query.includes('youtu.be')) { // Direct URL browserAction('open', { targetUrl: query }); } else { // Search and play first result const url = `${YOUTUBE_MUSIC_URL}/search?q=${encodeURIComponent(query + ' song')}`; browserAction('open', { targetUrl: url }); } console.log(`Playing: ${query}`); } ``` ### Technical Analysis `browserAction` constructs a shell command by interpolating parameter names and values into a string passed to `child_process.execSync`. Double quotes around a parameter do not provide safe shell escaping because a value containing a double quote can terminate the quoted argument. Shell metacharacters placed after that quote can then be interpreted by the shell. The direct-URL branch of `play` passes `query` without URL validation or shell escaping. The only check is whether the string contains `youtube.com` or `youtu.be`, which does not prevent the string from also containing quote characters or shell syntax. Although callers currently supply fixed action names and parameter names, the user-controlled `targetUrl` value alone is sufficient to reach the command-injection sink. ### Attack Path 1. A ...[truncated 1265 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ultra-play.js:145
Finding

Shell Command Injection Through the Direct Video ID Argument

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ultra-play.js:34
Finding

Shell Command Injection During Cache Serialization

Content
View full analysis
${CACHE_FILE}`); } catch (e) {} } ``` The user-controlled query is inserted into the object that is passed to `saveCache`: ```js if (useCache) { const cache = loadCache(); cache[query.toLowerCase()] = { searchUrl, timestamp: Date.now() }; saveCache(cache); } ``` ### Technical Analysis `saveCache` serializes the cache to JSON, embeds the result inside single quotes, and passes the resulting command to a shell. JSON string serialization does not escape apostrophes because apostrophes do not require escaping in JSON. Consequently, a query containing a single quote can terminate the shell's single-quoted string. Text following that apostrophe can be interpreted as shell syntax. The query is accepted from the `play` CLI arguments and becomes a JSON object key without validation. This is a distinct injection path from the direct-video-ID issue: exploitation occurs while persisting the query cache, even though the search URL itself was generated with `encodeURIComponent`. ### Attack Path 1. An attacker causes `ultra-play.js play` to run with a crafted query containing an apostrophe and shell syntax. 2. The query is URL-encoded for browser navigation, which protects that specific URL construction. 3. The original unencoded query is subsequently used as a property name in the cache object. 4. `JSON.stringify(cache)` preserves the apostrophe in the serialized data. 5. `saveCache` places ...[truncated 740 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ultra-play.js:16
Finding

Predictable Shared Temporary Cache Files Permit Symlink and Cache-Poisoning Attacks

Content
View full analysis
${CACHE_FILE}`); } catch (e) {} } ``` ```js case 'clear': fastExec(`rm -f ${CACHE_FILE}`); console.log('✅ Cache cleared!'); break; ``` The shell implementations use additional predictable paths: ```bash CACHE_FILE="/tmp/yt_music_v3.json" ``` ```bash CACHE_FILE="/tmp/yt_music_cache.json" ``` ### Technical Analysis The skill stores mutable cache data at fixed names in the globally shared `/tmp` directory. It does not: - Create a private per-user directory. - Check file ownership. - Reject symbolic links. - Set restrictive file permissions. - Securely create the file with exclusive semantics. - Validate all cache content before using it. A local attacker can pre-create these paths before the skill runs. For the JavaScript implementation, shell redirection follows symbolic links, so saving the cache can overwrite another file writable by the victim account. A regular attacker-created file can also supply poisoned JSON content. The v2 shell implementation reads cached URLs and passes them to browser automation: ```bash if [[ -f "$CACHE_FILE" ]]; then local cached_url=$(grep -o "\"${cache_key}\":\"[^\"]*\"" "$CACHE_FILE" 2>/dev/null | cut -d'"' -f4) if [[ -n "$cached_url" ]]; then log_play "Cached: $query" openclaw browser open --targetUrl="$cached_url" >/dev/null 2>&1 log_success "Playing from cach ...[truncated 1763 chars]
Remediation
View remediation
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (47)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · OPTIMIZATION_LOG.md (reported line 200)May include surrounding context.

For Developers:

bash
# Update skill
cd ~/.openclaw/workspace/skills/youtube-music
git pull  # or manual update

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the associated skill really performs filesystem inspection, chmod, environment validation, and test harness actions that are unrelated to media control, the description-behavior mismatch becomes security-relevant because it can conceal broader local-system access behind an innocuous media skill label. The danger is increased by the skill context: users expect browser music control, not host-level file or permission operations, so misleading packaging can bypass reviewer scrutiny.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The feature list states that queue management, playlist support, lyrics display, and recommendations are part of the completed skill. Later, the 'Future Enhancements' section lists lyrics automation, playlist management, and queue controls as not yet implemented, which directly contradicts the earlier claims about current capabilities.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · INSTALL_COMPLETE.md (reported line 13)May include surrounding context.

md
- 🔊 **Volume control** - Set volume levels (0-100%)
- 🔍 **Smart search** - Find tracks, artists, albums, playlists
- 📋 **Queue management** - View and manage playback queue
- 💾 **Playlist support** - Create and manage playlists
- 📝 **Lyrics display** - Show lyrics for current track
- 🎯 **Recommendations** - Get suggestions based on current track

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language examples are broad, common conversational phrases like 'pause the music' and 'what's playing now?' without activation boundaries or confirmation requirements. In an agent environment, this can cause unintended skill triggering from ordinary conversation or quoted text, leading to unauthorized browser actions against the user's YouTube Music session.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Stating that the skill is auto-discovered and can be used with generic natural-language commands, without specifying when it should not activate, increases prompt/command collision risk. In a multi-skill assistant, ambiguous activation can let unrelated user messages trigger playback control or searches in an authenticated browser profile.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The log documents automatic browser opening, search execution, auto-play behavior, and query-based caching without any mention of user consent, retention limits, or privacy implications. In a browser-automation skill, search terms and playback activity can reveal sensitive preferences or habits, so silently caching and replaying those actions creates a real privacy risk even if the feature is intended for performance.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 12)May include surrounding context.

md
- 🔊 **Volume control** - Set volume levels, mute/unmute
- 📋 **Queue management** - View and manage playback queue
- 🎶 **Search** - Find tracks, artists, albums, playlists
- 💾 **Playlists** - Create and manage playlists
- 📝 **Lyrics** - Display lyrics for current track
- 🎯 **Smart recommendations** - Get suggestions based on current track

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README presents very broad natural-language phrases such as "pause the music," "what's playing now?" and playlist/queue actions without defining any invocation prefix, confirmation boundary, or routing constraints. In a voice- or message-driven agent environment, vague triggers can cause unintended browser actions from ordinary conversation or quoted text, especially because this skill performs state-changing automation against a logged-in music session.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example activations "pause", "skip", and "find similar to this" are highly ambiguous and context-poor. In an agent that monitors natural language, these phrases are likely to collide with everyday speech or references to prior content, increasing the chance of unintended playback control or navigation actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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 and SKILL.md present this skill as providing broad YouTube Music control including playlist management, queue operations, lyrics, recommendations, context awareness, and multi-room casting. However, the file contains only descriptive documentation and examples; it does not implement or define code for those operations, so the claimed behavior is not substantiated by actual code in the analyzed file.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Overly broad trigger phrases like common playback verbs can cause accidental invocation in unrelated conversations, resulting in unintended browser automation actions. In a media-control skill this is contextually more dangerous than a read-only skill because actions can manipulate an authenticated YouTube Music session, alter playback state, or interact with the user's account context without clear intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Ambiguous discovery phrases such as generic search requests can overlap with ordinary assistant usage and unintentionally open or search YouTube Music. Because the skill uses browser automation against a logged-in web app, accidental activation can leak behavioral intent into the service, modify recommendations, or trigger unwanted navigation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Generic commands like 'show queue' or 'what's playing' are easily confused with normal conversation and may trigger autonomous interaction with an authenticated browser session. In this skill context, unintended invocation can reveal account-specific media state or perform actions on the user's session without explicit consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document promotes automatic browser-controlled playback, atomic open-and-play actions, auto-selection of results, and zero user interaction without any warning, confirmation step, or discussion of unintended actions. In a browser automation skill, this can lead to surprising media playback, navigation to unintended content, and loss of user control, especially when fuzzy matching and auto-play are enabled by default.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language examples are broad and do not define trigger constraints, allowed intents, or explicit exclusions. For a browser-automation music skill, ambiguous free-form commands can be over-interpreted by an agent, causing unintended navigation or state-changing actions beyond the safe playback scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The usage guide advertises natural-language capabilities such as lyrics display, playlist modification, queueing, and similar-track playback that are not reflected in the documented command surface. In an agent skill that performs browser automation, overstating supported actions can cause the orchestrating agent or user to rely on undefined behaviors, increasing the chance of unsafe automation, prompt confusion, or accidental interaction with the wrong UI elements.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents certain natural-language actions as available now, but later lists the same capabilities as future feature requests. This inconsistency is dangerous because agents may treat speculative features as executable behaviors, leading to unreliable or unintended browser actions in a live session.

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
scripts/control.js:20

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/direct-play.js:34

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/ultra-play.js:23