Skip to main content
Vulnerability Database/CVE-2026-77931

CVE-2026-77931: MoviePilot Command Injection RCE Vulnerability

CVE-2026-77931 is a command injection vulnerability in MoviePilot through 3.1.5 that enables remote code execution through malicious content processing. This post covers technical details, affected versions, attack vectors, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-77931 Overview

CVE-2026-77931 is a command injection vulnerability in MoviePilot through version 3.1.5. Attackers can embed malicious instructions in untrusted content processed by tools such as browse_webpage, search_web, and torrent metadata parsers. MoviePilot forwards the attacker-controlled content to the unrestricted ExecuteCommandTool, which invokes asyncio.create_subprocess_shell. By instructing the model to call execute_command with confirm_dangerous set to true, attackers bypass the validate_command_safety denylist and gain remote code execution under the admin session context.

Critical Impact

Remote attackers can achieve arbitrary OS command execution on the MoviePilot host by poisoning untrusted content consumed by the agent's tool chain.

Affected Products

  • MoviePilot through 3.1.5
  • Deployments exposing the agent interface with admin session context
  • Instances using ExecuteCommandTool without restricted command policies

Discovery Timeline

  • 2026-10-15 - CVE-2026-77931 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-77931

Vulnerability Analysis

MoviePilot integrates a large language model (LLM) agent that can invoke tools to fetch and process external content. The agent exposes ExecuteCommandTool, which executes shell commands via asyncio.create_subprocess_shell. The tool guards dangerous operations with validate_command_safety, a denylist-based check, and a confirm_dangerous flag intended to require explicit user confirmation.

The agent treats content returned from tools such as browse_webpage, search_web, and torrent metadata parsers as trusted model context. Attackers who control any of these upstream data sources can embed natural-language instructions that steer the model into calling execute_command with confirm_dangerous=true. Because the admin session carries is_admin context, the agent authorizes the call without additional friction.

Root Cause

The root cause is a prompt injection path combined with insufficient command gating. The denylist in validate_command_safety can be sidestepped when confirm_dangerous is set to true by the model itself, and no out-of-band confirmation enforces user intent. Untrusted web and torrent metadata enters the model context without isolation, enabling indirect prompt injection that drives tool invocation.

Attack Vector

The attack is network-reachable and requires user interaction, specifically the admin triggering an agent task that fetches attacker-controlled content. A hostile web page, search result, or torrent description instructs the model to run shell commands under the MoviePilot process account. See the Lasso Security advisory and VulnCheck advisory for additional technical detail.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-77931

Indicators of Compromise

  • Unexpected child processes spawned by the MoviePilot service account under asyncio.create_subprocess_shell.
  • Agent audit logs containing execute_command calls with confirm_dangerous=true originating from tool-returned content.
  • Outbound connections or file writes performed shortly after browse_webpage or search_web tool invocations.

Detection Strategies

  • Monitor process ancestry for shell invocations whose parent is the MoviePilot Python runtime.
  • Alert on any invocation of ExecuteCommandTool where the input prompt chain contains externally fetched content.
  • Correlate torrent metadata ingestion events with subsequent command execution within short time windows.

Monitoring Recommendations

  • Enable verbose logging for all agent tool calls, including arguments and the confirm_dangerous flag state.
  • Capture egress DNS and HTTP activity from the MoviePilot host to detect post-exploitation callbacks.
  • Review admin session activity for tool chains that unexpectedly terminate in execute_command.

How to Mitigate CVE-2026-77931

Immediate Actions Required

  • Restrict network exposure of MoviePilot admin interfaces to trusted networks only.
  • Disable or remove ExecuteCommandTool from the agent tool registry until a patched release is available.
  • Avoid processing untrusted URLs, search results, or torrent metadata through the agent while the vulnerability is unpatched.

Patch Information

No fixed version is identified in the published advisories at the time of writing. Monitor the VulnCheck advisory and the MoviePilot project for an official patched release beyond 3.1.5.

Workarounds

  • Replace the denylist in validate_command_safety with an allowlist of explicitly permitted commands.
  • Enforce out-of-band human confirmation for confirm_dangerous=true rather than trusting the model-provided flag.
  • Isolate tool-returned content from executable tool contexts, treating external text as data only.
  • Run MoviePilot under a least-privilege account inside a sandboxed container with no shell utilities on PATH.
bash
# Configuration example: remove ExecuteCommandTool and run under restricted user
docker run --rm \
  --user 1500:1500 \
  --read-only \
  --cap-drop ALL \
  --security-opt no-new-privileges \
  -e MOVIEPILOT_DISABLE_TOOLS=ExecuteCommandTool \
  -p 3000:3000 \
  moviepilot:latest

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.