Skip to content

Alist vulnerable to Path Traversal in multiple file operation handlers

High severity GitHub Reviewed Published Feb 4, 2026 in AlistGo/alist • Updated Feb 4, 2026

Package

gomod github.com/alist-org/alist/v3 (Go)

Affected versions

< 3.57.0

Patched versions

3.57.0

Description

Summary

The application contains a Path Traversal vulnerability (CWE-22) in multiple file operation handlers. An authenticated attacker can bypass directory-level authorisation by injecting traversal sequences into filename components, enabling unauthorised file removal, movement and copying across user boundaries within the same storage mount.

Details

The application contains a Path Traversal vulnerability (CWE-22) in multiple file operation handlers (server/handles/fsmanage.go, server/handles/fsbatch.go, etc.). Filename components in req.Names, renameObject.SrcName, and renameObject.NewName are directly concatenated with validated directories using stdpath.Join() or fmt.Sprintf(). This allows ".." sequences to bypass path restrictions, enabling users to access other users' files within the same storage mount and perform unauthorized actions such as deletion, renaming, or copying of files.

FsRemove:

func FsRemove(c *gin.Context) {
	// ...
	for _, name := range req.Names {
		err := fs.Remove(c, stdpath.Join(reqDir, name))

FsCopy:

func FsCopy(c *gin.Context) {
	// ...
	for i, name := range req.Names {
		t, err := fs.Copy(c, stdpath.Join(srcDir, name), dstDir, len(req.Names) > i+1)

FsBatchRename:

func FsBatchRename(c *gin.Context) {
    // ...
    for _, renameObject := range req.RenameObjects {
        filePath := fmt.Sprintf("%s/%s", reqPath, renameObject.SrcName)  // Vulnerable concatenation ✗
        fs.Rename(c, filePath, renameObject.NewName)
    }
}

PoC

  1. Environment setup:
  • Storage mount '/shared' configured with multiple users.
  • Alice has base path '/shared/alice'.
  • Admin has base path '/shared/admin' with private files.
  • Both users operate within the same storage mount.
  1. Craft Malicious Request:
    Alice sends a POST request to /api/fs/remove containing a filename with '../' in it.
curl -X POST -H  "Content-Type: application/json" -d '{"dir":"/","names":["../admin/private.txt"]}' http://localhost:5244/api/fs/remove

Admin's file is deleted without Alice having authorisation for Admin's directory.

Video

Impact

This vulnerability enables privilege escalation within shared storage environments. An authenticated attacker with basic file operation permissions (remove/rename/copy/move) can bypass directory-level authorisation controls when multiple users exist within the same storage mount.

Attack Requirements:

  1. Authenticated user account (not guest)
  2. Basic file operation permissions
  3. Multi-user environment within the same storage mount

Consequences:

  1. Unauthorised data access: Read, copy, and exfiltrate files from other users' directories
  2. Data destruction: Delete or rename files belonging to other users
  3. Access control bypass: Circumvent directory isolation mechanisms
  4. Integrity violation: Modify or move files across user boundaries

Credit

This vulnerability was discovered by:

  • XlabAI Team of Tencent Xuanwu Lab
  • Atuin Automated Vulnerability Discovery Engine

If there are questions regarding the vulnerability details, please feel free to reach out for further discussion at xlabai@tencent.com.

References

@okatu-loli okatu-loli published to AlistGo/alist Feb 4, 2026
Published to the GitHub Advisory Database Feb 4, 2026
Reviewed Feb 4, 2026
Published by the National Vulnerability Database Feb 4, 2026
Last updated Feb 4, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(17th percentile)

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

CVE ID

CVE-2026-25161

GHSA ID

GHSA-x4q4-7phh-42j9

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.