/

CVE-2026-25161

Severity:

HIGH RISK

(8.8)

Path Traversal in Alist File Operation Handlers

CVE-2026-25161

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Access and Manipulation

Severity:

HIGH RISK

(8.8)

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

Alist contains a path traversal vulnerability in several file operation handlers that allows authenticated users to inject traversal sequences into filename components.

When triggered, this bypasses directory-level authorization and can result in unauthorized file deletion, movement, or copying across user boundaries within the same storage mount.

Affected context

This vulnerability affects Alist deployments where:

  • Users have authenticated access to file management features (e.g., upload, move, copy, delete, or rename operations).
  • File operations rely on user-supplied path or filename components to construct filesystem paths.
  • Directory-level authorization is enforced logically at the application level, rather than at the underlying storage layer.

In these conditions, crafted path segments containing traversal sequences can cause operations to target files outside the intended authorized directory scope, but still within the same storage mount.

Exploit preconditions

  • Attack surface: HTTP endpoints that expose file operation handlers (e.g., copy/move/delete/rename APIs) in the Alist application.
  • Required access: Valid authenticated account with permission to perform file operations in at least one directory.
  • Trigger point: Submission of file operation requests where filename or path components contain traversal patterns (such as sequences that resolve to parent or sibling directories).
  • Why exploitation is possible: The server-side logic normalizes or concatenates user-supplied path segments without consistently validating or constraining the resulting filesystem path to the authorized directory, allowing traversal outside the user's permitted subtree.

Why this happens

The underlying issue aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Alist's file operation handlers appear to accept user-controlled filename or path components and combine them with base directories to compute the final filesystem path.

Without robust normalization and enforcement that the resulting path remains within an authorized directory boundary, traversal sequences in user input can redirect operations to other locations.

This insecure pattern arises when authorization checks are applied based on the intended logical path, but the actual path used for the filesystem operation is derived from unvalidated or insufficiently constrained user input.

Potential impact

  • Unauthorized deletion of files belonging to other users within the same storage mount.
  • Unauthorized copying of other users' files into locations accessible to the attacker, leading to information disclosure.
  • Unauthorized movement or renaming of files, potentially causing data loss, corruption, or confusion.
  • Bypassing directory-level access control policies enforced by the application.
  • Disruption of shared storage structures by tampering with sensitive or system-managed directories under the same mount.

General mitigation guidance

Effective mitigation focuses on strict path normalization, boundary enforcement, and defense-in-depth around file operations:

  • Normalize and canonicalize all user-supplied paths before use, resolving traversal sequences and symbolic links where applicable.
  • Verify after normalization that the final path remains within an expected base directory and is associated with the correct user or tenant context.
  • Avoid using raw user input directly in filesystem paths; instead, use internal identifiers or mappings from logical paths to storage locations.
  • Centralize file operation logic so that all handlers consistently apply the same validation, normalization, and authorization checks.
  • Implement layered authorization that couples directory-level permissions with object-level checks, ensuring the caller is authorized for both the source and destination paths.
  • Reduce privileges of the runtime environment so that even if traversal occurs, access to highly sensitive server-side directories is limited by OS-level permissions.

How teams detect issues like this

Detection typically involves a mix of code-focused and operational approaches:

  • Static analysis: Configure rules to flag uses of user-controlled path segments in filesystem APIs (e.g., file delete, move, copy) without preceding canonicalization and boundary checks.
  • Code review: Examine handlers that process file operations, ensuring that:
  • All paths are normalized and checked against a per-user base directory.
  • Authorization checks are based on the actual path used for filesystem operations.
  • Runtime logging and monitoring: Log file operations with both requested paths and resolved canonical paths, then monitor for patterns where operations target directories outside expected user scopes.
  • Security testing: Use automated or manual tests to attempt directory traversal across user boundaries, validating that the application rejects paths that escape the authorized directory tree.

Sources

SourceLink
github.comgithub.com/AlistGo/alist/commit/b188288525b9a35c76535139311e7c036dab057e
github.comgithub.com/AlistGo/alist/security/advisories/GHSA-x4q4-7phh-42j9

Frequently asked

questions

Exploitation is limited to authenticated users who can access file operation features, but within that scope it can be significant, as it allows actions on files outside the user's authorized directories within the same storage mount.

Not necessarily. A regular user account with permission to perform file operations in its own area can potentially abuse this flaw to affect other users' files, assuming directory-level authorization is relied upon for isolation.

The safest pattern is to canonicalize all paths derived from user input and strictly enforce that the resulting path stays under a known, per-user or per-tenant root directory before performing any filesystem operation, rejecting requests that fail this check.

Use centralized utilities for path handling that perform normalization and boundary enforcement by default, avoid building filesystem paths directly from user-supplied strings, and incorporate automated checks and security reviews focused on file and path handling logic in the development lifecycle.

Find out what's already
exploitable in your codebase.