Back to skill

Security audit

Media Cli Local

Security checks for vulnerabilities and agentic risk

Overview

The skill fits its media-control purpose, but it asks users to run an unpinned external script and gives agents commands that can change or delete local media downloads.

Review the upstream media script before installing, prefer a pinned commit or verified release, and only let an agent use this skill when you are comfortable with it controlling your local media services and deleting downloads when explicitly requested.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:26
Finding

Unpinned Remote Payload Retrieval and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 26-34
Vulnerability Type: Remote retrieval and execution of mutable, unaudited code
Risk Level: High

The installation instructions direct users to clone an externally hosted Git repository from its mutable default branch, copy a downloaded Bash script into their executable path, grant it execute permission, and run it. The externally retrieved script is not included in the audited project, and its integrity is not verified.

markdown
**Source:** https://github.com/solomonneas/media-cli

**Install:** Clone the repo and copy the script to your PATH. Review it first.

```bash
git clone https://github.com/solomonneas/media-cli.git
cd media-cli
cp media ~/bin/media && chmod +x ~/bin/media
media setup
text

### Technical Analysis

The `git clone` command retrieves the repository's current default branch without pinning it to an audited commit hash or immutable signed release. No checksum, cryptographic signature, or trusted manifest is used to validate the downloaded `media` script before execution.

Consequently, the effective code executed by users can change after this Skill has been reviewed. The instruction to “Review it first” is advisory only and does not provide an enforceable integrity control. Because the downloaded script is absent from the audited artifact, claims that it communicates only with localhost services, does not perform telemetry, and securely handles configuration cannot be independently verified.

This behavior most closely matches `T03: Remote Payload Retrieval and Execution`: executable code is obtained from an external URL and immediately prepared and invoked, allowing the effective payload to change independently of the reviewed Skill.

### Attack Path

1. An attacker compromises the upstream repository, a maintainer account, or the repository's mutable default branch.
2. The attacker modifies the upstream `media` 
...[truncated 1439 chars]
Remediation
View remediation

Remediation Suggestions

  1. Vendor the reviewed media script directly in the Skill package so its contents are covered by the same audit and versioning process.
  2. If remote installation remains necessary, pin the source to a specific reviewed commit hash or immutable release artifact rather than the repository's mutable default branch.
  3. Publish a SHA-256 checksum through a trusted channel and require the installer to verify it before granting execute permission or running the script.
  4. Prefer cryptographically signed releases and verify the maintainer's signature against a documented trusted public key.
  5. Make integrity verification fail closed: installation must stop if the checksum or signature is missing or invalid.
  6. Audit the actual Bash source for command injection, unsafe configuration parsing, insecure temporary files, credential exposure, unexpected outbound requests, and excessive filesystem permissions.
  7. Avoid placing the executable in ~/bin until verification has succeeded, and document the exact version or commit expected by the Skill.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Setup

The setup wizard asks for API URLs and keys, saves to ~/.config/media-cli/config (chmod 600). All connections are localhost only.

bash
media setup    # Interactive config wizard

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation exposes a destructive command, media downloads remove <hash> [true], where true deletes files, but it does not prominently warn about irreversible data loss. In an AI-agent or copy/paste workflow, this omission can lead operators to execute file-deleting actions without understanding the consequence, especially since nearby commands are presented as routine operational examples.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill provides very broad natural-language trigger examples such as "Add Succession" and "Pause all downloads" for use by AI agents, without any activation guardrails, confirmation steps, or scoping constraints. In an agentic shell-execution context, this increases the chance that incidental user text or ambiguous instructions are translated into real state-changing commands, including media additions or pausing/removing downloads.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- Talks to *arr v3 APIs (Sonarr/Radarr), v1 (Prowlarr), v2 (qBittorrent WebUI)
- Python3 used strictly for JSON parsing (standard library)
- No telemetry, no analytics, no network calls except to your own services
- Config stored at `~/.config/media-cli/config` with chmod 600