Back to skill

Security audit

Plex Media Remote

Security checks for vulnerabilities and agentic risk

Overview

This Plex skill is mostly purpose-aligned, but it caches detailed private library metadata in a predictable shared temp file while describing that caching too narrowly.

Review this before installing if your Plex library contents are private. Use a limited Plex token if possible, avoid running it on shared machines, and clear or relocate the cache until the skill uses a private per-user cache directory with restrictive permissions and clearer retention controls.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/plex_cli.py:17
Finding

Predictable Shared Temporary Cache Permits Metadata Disclosure, Cache Poisoning, and Symlink Attacks

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/plex_cli.py:2
Finding

Automatically Resolved Plex Dependency Is Not Version-Pinned

Content
View full analysis
=3.8" # dependencies = [ # "plexapi", # ] # /// ``` The documented invocation automatically resolves this dependency through `uv`: ```markdown The script uses `plexapi`. Dependencies are managed automatically via `uv`. ``` ```bash uv run scripts/plex_cli.py [arguments] ``` ### Technical Analysis The inline dependency declaration specifies only the package name and does not constrain it to a reviewed version. No lockfile or package hash is included in the audited project. When the documented `uv run` command is executed in an environment where the dependency is not already resolved and cached, `uv` may retrieve a newer compatible release from its configured package index. This means that code outside the audited project can change independently after the skill has been reviewed. The imported package executes in the same Python process as the skill and can access the process environment, including `PLEX_TOKEN` and `PLEX_URL`. The finding does not establish that the current `plexapi` package is malicious; the risk arises from accepting future or otherwise unreviewed package versions automatically. ### Attack Path 1. A malicious release is published under the legitimate dependency name after an upstream account or distribution channel is compromised, or an unreviewed release introduces harmful behavior. 2. The user invokes the documented `uv run scripts/plex_cli.py ...` command. 3. `uv` resolves and downloads the unconstrained package version from its configured source. 4. Python imports `plexapi.server` before executing the requested CLI action. 5. Import-time or runtime dependency code executes with the privileges and environment of the skill process. 6. Such ...[truncated 857 chars]
Remediation
View remediation

other

Note
Location
metadata.json:18
Finding

Privacy Documentation Understates the Scope and Retention of Cached Plex Metadata

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description is broadly aligned with the main purpose: this is indeed a standalone command-line Plex management tool with playback controls and temporary caching in the system temp directory. However, the declared permissions are empty, while the code clearly requires network access to a Plex server, reads sensitive connection credentials from environment variables, and performs substantial metadata access and local caching. It also exposes additional management and monitoring capabilities—listing libraries, sessions, clients, server info, and continue-watching data—that are not mentioned in the description. These are material undeclared capabilities/resources rather than mere implementation details, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/plex_cli.py (reported line 15)May include surrounding context.

python
from plexapi.server import PlexServer

# ClawHub security warning remediation:
# 1. We no longer use .env files (assumes environment variables are injected by the agent).
# 2. Cache is now stored in the system temp directory to avoid persistent file tracking in the skill folder.
CACHE_FILE = os.path.join(tempfile.gettempdir(), "plex_media_cache.json")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares access to sensitive environment variables and describes local caching, but it does not define an explicit tool scope such as permissions or allowed-tools. In an agent setting, missing scope boundaries increases the chance of unintended file access, credential handling, or writes beyond what operators expect, especially because the skill uses env, file_read, and file_write capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The CLI exposes state-changing playback actions (play, pause, resume, stop) that execute immediately against named Plex clients with no confirmation, policy check, or access control beyond possession of the Plex token. In an agent context, this increases the risk of unintended or unauthorized commands affecting active user sessions and devices, especially if natural-language requests are misinterpreted or the skill is invoked indirectly.

Content

No source excerpt is available for this finding.