/

CVE-2026-11416

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in MoviePilot Cloud Storage Download Handlers

CVE-2026-11416

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Overwrite / Write Outside Intended Directory

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MoviePilot's AliPan, U115, and Rclone download handlers build local file paths by concatenating a configured download directory with filenames taken directly from cloud storage metadata, without normalization or validation.

If an attacker can control the filename returned by a cloud storage API, they can inject directory traversal sequences (such as ../) to write files outside the intended download directory and potentially overwrite sensitive application files.

Affected context

This vulnerability arises in MoviePilot deployments that use AliPan, U115, or Rclone integrations to download content from remote cloud storage.

The issue is present where the application constructs destination paths by directly concatenating the configured download directory with filenames derived from remote API metadata, without applying basename extraction, canonicalization, or directory boundary checks.

It becomes relevant when remote or multi-tenant storage can return attacker-controlled filenames for download.

Exploit preconditions

  • Attack surface: Cloud storage download endpoints using AliPan, U115, or Rclone handlers.
  • Required access: Ability to influence or control filenames within the connected cloud storage account or API responses (for example, through file uploads, shared folders, or compromised credentials).
  • Trigger point: Initiation of a download operation in MoviePilot that retrieves metadata from the cloud provider and constructs a local path from the remote filename.
  • Why exploitation is possible: The handler trusts the remote filename, concatenates it with the download directory, and does not normalize or validate the resulting path, allowing traversal segments (../) to escape the intended directory.

Why this happens

The core issue is a failure to validate and normalize user-influenced path components before using them in filesystem operations.

By directly concatenating the configured download directory with a filename taken from remote metadata, the code implicitly trusts that the filename is safe and relative, which violates the assumptions behind CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Without stripping directory separators, rejecting traversal tokens, or enforcing that the final resolved path remains within the intended download directory, attacker-controlled filenames can redirect writes to arbitrary locations accessible by the application process.

Potential impact

  • Overwriting arbitrary files that the MoviePilot process can write to, including configuration files.
  • Modifying plugin or script files that may later be executed, potentially leading to remote code execution.
  • Planting malicious content in web-servable directories, which could enable web-based attacks depending on deployment.
  • Corrupting application data or user media files stored on the same filesystem.
  • Facilitating privilege escalation within the application's runtime context if critical files are overwritten.

General mitigation guidance

Effective mitigation focuses on ensuring all filesystem operations respect directory boundaries and treat filenames as untrusted data:

  • Normalize and sanitize filenames derived from remote or user-controlled sources, removing path separators and traversal tokens, and using only the basename component.
  • Construct paths using path-joining utilities that operate on trusted base directories and then canonicalize the result, verifying that the resolved path still resides inside the allowed download directory.
  • Enforce an allowlist of valid characters and patterns for filenames, rejecting unexpected or malformed inputs at the API boundary.
  • Apply least-privilege principles to the MoviePilot process, reducing its ability to overwrite sensitive system or application files even if a traversal is attempted.
  • Separate writable media directories from configuration, executable, and plugin directories to minimize the blast radius of any file write logic.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using a combination of review and tooling:

  • Perform static code analysis to flag direct string concatenation when building filesystem paths from remote or user-controlled values, particularly when using cloud storage metadata.
  • During code review, look for path construction that does not use canonicalization, basename extraction, or post-join boundary checks, and for any acceptance of ../ sequences or absolute paths in filenames.
  • Define secure coding guidelines or linting rules that prohibit raw concatenation of directory paths and filenames, requiring path-joining utilities and post-resolution validation instead.
  • Use runtime monitoring or file integrity checks on critical configuration and plugin directories to detect unexpected modifications originating from download handlers.

Sources

SourceLink
github.comgithub.com/jxxghp/MoviePilot
github.comgithub.com/jxxghp/MoviePilot/commit/a0b3800f6bf4857bf4f889a63d44350eb8380f28
github.comgithub.com/jxxghp/MoviePilot/issues/5894

Frequently asked

questions

It can be, if attackers can control filenames returned by the connected cloud storage service, for example by uploading files or manipulating shared folders. In that case, initiating a download in MoviePilot may trigger arbitrary file writes on the server.

An attacker needs influence over the filenames coming from AliPan, U115, or Rclone APIs. This typically requires access to the associated cloud account, a shared location within that account, or another path to inject crafted filenames into the remote storage.

Always treat remote and user-controlled filenames as untrusted: extract only the basename, normalize the full path after joining it with the trusted download directory, and verify that the resolved path remains inside the intended directory before writing. Reject any input that does not meet these constraints.

Establish a standard file handling utility for the codebase that encapsulates path joining, normalization, and boundary checks, and require all components—including new cloud storage integrations—to use it. Combine this with coding standards, static analysis rules, and privilege separation to ensure that no component writes files based on raw, unchecked path input.

Find out what's already
exploitable in your codebase.