CVE-2026-77931
Executive Summary
CVE-2026-77931 is a critical command injection vulnerability affecting MoviePilot through version 3.1.5. Attackers can execute arbitrary OS commands by embedding malicious instructions in untrusted content processed through tools like browse_webpage, search_web, and torrent metadata parsers. The vulnerability has a CVSS score of 8.8, indicating high severity with potential for complete host compromise.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability exists in MoviePilot's command execution architecture, specifically within the ExecuteCommandTool functionality. The core issue is that untrusted content from external sources (web pages, search results, torrent metadata) is processed and passed to an unrestricted command execution mechanism via asyncio.create_subprocess_shell.
The attack surface includes three primary vectors:
- browse_webpage - processes web content that may contain malicious instructions
- search_web - processes search results from external sources
- torrent metadata parsers - process metadata embedded in torrent files
The vulnerability bypasses the validate_command_safety denylist through multiple mechanisms. Attackers can craft content that instructs the model to invoke execute_command with confirm_dangerous set to true, effectively bypassing safety checks. Additionally, the admin session's is_admin context provides elevated privileges that allow command execution without proper validation.
The use of asyncio.create_subprocess_shell without proper sanitization or allowlisting of commands enables arbitrary OS command execution. The denylist approach in validate_command_safety is fundamentally flawed since it can be bypassed through command obfuscation, path manipulation, or by leveraging the confirm_dangerous parameter.
Exploitation Scenarios
No public PoC available; attack chain is inferred from vulnerability class.
Reconnaissance/target identification: Attackers identify MoviePilot instances through Shodan searches using product/title tags or HTTP response fingerprinting. The web interface typically runs on default ports and provides identifiable signatures in HTTP responses.
Triggering the vulnerability: The attacker embeds malicious instructions in content that MoviePilot processes. This could be achieved by:
- Creating or compromising a webpage that MoviePilot browses via browse_webpage
- Manipulating search results returned through search_web
- Crafting torrent metadata containing injection payloads The malicious content contains instructions that cause the system to invoke execute_command with confirm_dangerous set to true.
Payload/execution method: Once the model processes the malicious content and invokes execute_command, the payload is executed via asyncio.create_subprocess_shell. The payload bypasses validate_command_safety through the confirm_dangerous parameter or by crafting commands that avoid denylist patterns. The is_admin context ensures execution with elevated privileges.
Post-exploitation impact: Successful exploitation grants arbitrary OS command execution on the host, enabling:
- Data exfiltration from the MoviePilot application and connected databases
- Installation of persistent backdoors
- Lateral movement to other systems accessible from the compromised host
- Complete compromise of the media management infrastructure
Impact Assessment
The CVSS 3.1 score of 8.8 reflects the severe impact potential:
- Confidentiality (C:H): Complete loss of confidentiality as attackers can read any file accessible to the MoviePilot process
- Integrity (I:H): Complete loss of integrity through arbitrary command execution and file modification
- Availability (A:H): Complete loss of availability through service disruption, data destruction, or resource exhaustion
- Attack Vector (AV:N): Network-accessible vulnerability exploitable remotely
- Attack Complexity (AC:L): Low complexity, requiring minimal specialized conditions
- Privileges Required (PR:N): No authentication required for initial access
- User Interaction (UI:R): Requires user interaction, likely through triggering content processing
MoviePilot installations are typically deployed in home labs or small business environments, often with access to network storage, media libraries, and potentially other connected services. The blast radius extends to all systems accessible from the MoviePilot host, including NAS devices, media servers, and potentially cloud storage credentials.
Detection Guidance
Sigma Rule
title: MoviePilot Command Injection Exploitation Attempt
id: 5e3f9a7b-2c1d-4e8f-9a6b-3d7c8e9f1a2b
status: experimental
description: Detects potential command injection attempts against MoviePilot through suspicious subprocess execution
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-77931
author: Valters IT Security Team
date: 2026/01/15
tags:
- attack.t1059
- attack.execution
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/python3'
- '/python'
ParentCommandLine|contains|all:
- 'MoviePilot'
- 'asyncio'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/cmd.exe'
- '/powershell.exe'
CommandLine|contains:
- 'curl '
- 'wget '
- 'nc '
- 'base64 '
- '/dev/tcp/'
- 'chmod +x'
condition: selection_parent and selection_child
falsepositives:
- Legitimate administrative scripts
- Plugin installations
level: high
YARA Rule
rule CVE_2026_77931_MoviePilot_CommandInjection
{
meta:
description = "Detects command injection patterns in MoviePilot content processing"
author = "Valters IT Security Team"
date = "2026-01-15"
reference = "CVE-2026-77931"
severity = "critical"
strings:
$s1 = "execute_command" ascii wide nocase
$s2 = "confirm_dangerous" ascii wide nocase
$s3 = "create_subprocess_shell" ascii wide nocase
$s4 = "validate_command_safety" ascii wide nocase
$s5 = "browse_webpage" ascii wide nocase
$s6 = "search_web" ascii wide nocase
$cmd1 = "curl" ascii wide nocase
$cmd2 = "wget" ascii wide nocase
$cmd3 = "base64" ascii wide nocase
$cmd4 = "/bin/sh" ascii wide
$cmd5 = "cmd.exe" ascii wide nocase
$bypass1 = "confirm_dangerous":true" ascii wide nocase
condition:
(uint32(0) == 0x464C457F or uint32(0) == 0x04034b50) and
(
(any of ($s*)) and
(any of ($cmd*)) and
$bypass1
) or
(
3 of ($s*) and
2 of ($cmd*)
)
}
Suricata IDS Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"CVE-2026-77931 MoviePilot Command Injection Attempt"; flow:established,to_server; content:"POST"; http_method; content:"/api/"; http_uri; content:"execute_command"; http_client_body; content:"confirm_dangerous"; http_client_body; content:"true"; http_client_body; classtype:attempted-admin; reference:cve,2026-77931; reference:url,nvd.nist.gov/vuln/detail/CVE-2026-77931; sid:202677931; rev:1; metadata:created_at 2026_01_15, updated_at 2026_01_15, created_by ValtersIT;)
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-77931 MoviePilot Outbound Command Execution Callback"; flow:established,to_server; content:"GET"; http_method; pcre:"/(curl|wget|base64|nc|bash).*(sh|cmd|bash|/dev/tcp)/Ri"; classtype:attempted-admin; reference:cve,2026-77931; sid:202677932; rev:1;)
Elastic Detection
process where event.type == "start" and
process.parent.name in ("python", "python3") and
process.parent.command_line : "*MoviePilot*" and
process.name in ("sh", "bash", "cmd.exe", "powershell.exe", "curl", "wget", "nc") and
(
process.command_line : "*(*curl*" or
process.command_line : "*(*wget*" or
process.command_line : "*(*base64*" or
process.command_line : "*(*nc *" or
process.command_line : "*(*/dev/tcp/*" or
process.command_line : "*(*chmod +x*"
)
Splunk SPL Query
index=linux_process OR index=endpoint_process
(process_name=sh OR process_name=bash OR process_name=cmd.exe OR process_name=powershell.exe)
(parent_process_name=python OR parent_process_name=python3)
(parent_process_command_line="*MoviePilot*" OR parent_process_command_line="*asyncio*")
| eval risk_score=case(
match(command_line, "(?i)(curl|wget).*\|\s*(sh|bash)"), "Critical",
match(command_line, "(?i)/dev/tcp/"), "Critical",
match(command_line, "(?i)(nc|netcat).*-e"), "Critical",
match(command_line, "(?i)base64.*-d.*\|"), "High",
1=1, "Medium"
)
| where risk_score IN ("Critical", "High")
| stats count values(process_name) as processes values(command_line) as cmdlines by host, parent_process_name, user
| sort by count desc
Wazuh OSSEC Rule
<group name="moviepilot,cve-2026-77931,command_injection">
<rule id="100931" level="12">
<if_sid>5920</if_sid>
<field name="audit.exe">/bin/sh|/bin/bash|/usr/bin/curl|/usr/bin/wget|/usr/bin/base64</field>
<field name="audit.ppid">\d+</field>
<description>CVE-2026-77931: Potential MoviePilot command injection - suspicious shell spawned from Python parent</description>
<mitre>
<id>T1059</id>
</mitre>
<group>cve-2026-77931,command_injection,</group>
</rule>
<rule id="100932" level="13">
<if_sid>100931</if_sid>
<field name="audit.command">curl|wget|base64|nc|/dev/tcp|chmod</field>
<description>CVE-2026-77931: MoviePilot command injection - malicious command execution detected</description>
<mitre>
<id>T1059</id>
<id>T1059.004</id>
</mitre>
<group>cve-2026-77931,command_injection,persistence,</group>
</rule>
<rule id="100933" level="10">
<if_sid>100931</if_sid>
<field name="audit.parent_command">MoviePilot|asyncio</field>
<description>CVE-2026-77931: MoviePilot process spawning shell - possible exploitation attempt</description>
<mitre>
<id>T1059</id>
</mitre>
<group>cve-2026-77931,</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source).
1) Immediate mitigations:
- Restrict network access to MoviePilot instances using firewall rules and network segmentation. Do not expose MoviePilot directly to the internet.
- Implement Web Application Firewall (WAF) rules to block suspicious requests containing command injection patterns.
- Disable or restrict access to browse_webpage and search_web functionality if not essential for operations.
- Run MoviePilot with minimal privileges using containerization or dedicated service accounts with restricted permissions.
- Monitor for suspicious subprocess execution from MoviePilot processes, particularly shell invocations containing curl, wget, base64, or network-related commands.
- Consider temporarily disabling torrent metadata parsing features until a patch is available.
2) Patch/upgrade steps:
- No official patch is currently available. Monitor the MoviePilot project repository and security advisories for updates.
- When a patch is released, upgrade to the patched version immediately.
- If a patched version becomes available, verify the patch addresses the vulnerability by reviewing the changelog and code changes.
3) Long-term hardening:
- Replace the denylist-based validate_command_safety approach with an allowlist-based validation mechanism.
- Implement strict input validation and sanitization for all content processed from external sources.
- Use parameterized command execution rather than shell invocation. Replace asyncio.create_subprocess_shell with asyncio.create_subprocess_exec where possible.
- Remove the confirm_dangerous parameter bypass or require multiple confirmations for dangerous operations.
- Implement proper privilege separation, ensuring the application runs with minimal necessary permissions.
- Conduct regular security audits and penetration testing of the MoviePilot application.
- Enable comprehensive logging and monitoring for all command execution activities.
References
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-77931
- MoviePilot Project Repository: Consult official project channels for security advisories and patch availability
- CWE-78: OS Command Injection — https://cwe.mitre.org/data/definitions/78.html
- MITRE ATT&CK T1059: Command and Scripting Interpreter — https://attack.mitre.org/techniques/T1059/
- OWASP Command Injection Prevention Cheat Sheet — https://cheatsheetseries.owasp.org/cheatsheets/OS_Command_Injection_Defense_Cheat_Sheet.html
No known threat actor campaigns or exploit-in-the-wild evidence are currently associated with CVE-2026-77931. No CISA KEV listing exists at time of reporting. EPSS score has not yet been assigned by FIRST.org.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.