CVE-2026-25161: Github.com/alist org/alist/v3 Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-x4q4-7phh-42j9
CVSS 8.8
CWE-22
Published
Advisory Summary

CVE-2026-25161 is a HIGH (CVSS 8.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/alist org/alist/v3 libraries in the Go ecosystem. The issue involves alist vulnerable to path traversal in multiple file operation handlers. Remediation is available by upgrading affected packages to version 3.57.0.

CVE-2026-25161 at a Glance

CVE Identifier CVE-2026-25161
GHSA Identifier GHSA-x4q4-7phh-42j9
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/alist org/alist/v3
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-25161

To remediate this vulnerability, upgrade all affected Github.com/alist org/alist/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/alist-org/alist/v3 fixed: 3.57.0
Upgrade github.com/alist-org/alist/v3 to 3.57.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/alist-org/alist/v3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-25161, inspect your project dependencies for Github.com/alist org/alist/v3:

inspect dependencies for github.com/alist-org/alist/v3

Analyze the terminal output to locate any version of Github.com/alist org/alist/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.57.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In Github.com/alist org/alist/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/AlistGo/alist/blob/main/server/handles/fsmanage.go), [server/handles/fsbatch.go](https://github.com/AlistGo/alist/blob/main/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](https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsmanage.go#L253-L254): ~~~go func FsRemove(c *gin.Context) { // ... for _, name := range req.Names { err := fs.Remove(c, stdpath.Join(reqDir, name)) ~~~ [FsCopy](https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsmanage.go#L165-L166): ~~~go 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](https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsbatch.go#L188-L189): ~~~go 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. 2. Craft Malicious Request: Alice sends a POST request to _/api/fs/remove_ containing a filename with '../' in it. ~~~bash 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](https://github.com/user-attachments/assets/5789fa36-c82c-4781-a5f7-145f54689ada) ### 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.

CVE-2026-25161 Affected Github.com/alist org/alist/v3 Versions

1 component(s)
Fixed Versions:
3.57.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/alist-org/alist/v3
Go
< 3.57.0
3.57.0

References

Frequently Asked Questions

What is CVE-2026-25161?
CVE-2026-25161 is a security vulnerability in Github.com/alist org/alist/v3 involving Alist vulnerable to Path Traversal in multiple file operation handlers under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/alist org/alist/v3 versions are affected?
Affected versions include releases prior to 3.57.0 across affected packages: github.com/alist-org/alist/v3.
What version fixes CVE-2026-25161?
Upgrading to 3.57.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/alist-org/alist/v3 affected?
Yes, github.com/alist-org/alist/v3 is affected in releases prior to 3.57.0. Upgrade your dependency to 3.57.0 or later.
What is the CVSS score of CVE-2026-25161?
CVE-2026-25161 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-25161?
CVE-2026-25161 is classified under CWE-22: 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.).
How can I check Go dependencies for CVE-2026-25161?
Run the dependency tree command: 'inspect dependencies for github.com/alist-org/alist/v3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x4q4-7phh-42j9",
  "modified" : "2026-02-04T21:56:56Z",
  "published" : "2026-02-04T18:52:23Z",
  "aliases" : [ "CVE-2026-25161" ],
  "summary" : "Alist vulnerable to Path Traversal in multiple file operation handlers",
  "details" : "### Summary\nThe 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.\n\n### Details\nThe application contains a Path Traversal vulnerability (CWE-22) in multiple file operation handlers ([server/handles/fsmanage.go](https://github.com/AlistGo/alist/blob/main/server/handles/fsmanage.go), [server/handles/fsbatch.go](https://github.com/AlistGo/alist/blob/main/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.\n\n[FsRemove](https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsmanage.go#L253-L254):\n~~~go\nfunc FsRemove(c *gin.Context) {\n\t// ...\n\tfor _, name := range req.Names {\n\t\terr := fs.Remove(c, stdpath.Join(reqDir, name))\n~~~\n\n[FsCopy](https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsmanage.go#L165-L166):\n~~~go\nfunc FsCopy(c *gin.Context) {\n\t// ...\n\tfor i, name := range req.Names {\n\t\tt, err := fs.Copy(c, stdpath.Join(srcDir, name), dstDir, len(req.Names) > i+1)\n~~~\n\n[FsBatchRename](https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsbatch.go#L188-L189):\n~~~go\nfunc FsBatchRename(c *gin.Context) {\n    // ...\n    for _, renameObject := range req.RenameObjects {\n        filePath := fmt.Sprintf(\"%s/%s\", reqPath, renameObject.SrcName)  // Vulnerable concatenation ✗\n        fs.Rename(c, filePath, renameObject.NewName)\n    }\n}\n~~~\n\n\n#### PoC\n1. Environment setup:\n- Storage mount '/shared' configured with multiple users.\n- Alice has base path '/shared/alice'.\n- Admin has base path '/shared/admin' with private files.\n- Both users operate within the same storage mount.\n\n2. Craft Malicious Request:\nAlice sends a POST request to _/api/fs/remove_ containing a filename with '../' in it.\n~~~bash\ncurl -X POST -H  \"Content-Type: application/json\" -d '{\"dir\":\"/\",\"names\":[\"../admin/private.txt\"]}' http://localhost:5244/api/fs/remove\n~~~\n\nAdmin's file is deleted without Alice having authorisation for Admin's directory.\n\n[Video](https://github.com/user-attachments/assets/5789fa36-c82c-4781-a5f7-145f54689ada)\n\n\n### Impact\nThis 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.\n\n#### Attack Requirements:\n1. Authenticated user account (not guest)\n2. Basic file operation permissions\n3. Multi-user environment within the same storage mount\n\n#### Consequences:\n1. Unauthorised data access: Read, copy, and exfiltrate files from other users' directories\n2. Data destruction: Delete or rename files belonging to other users\n3. Access control bypass: Circumvent directory isolation mechanisms\n4. Integrity violation: Modify or move files across user boundaries\n\n\n### Credit\nThis vulnerability was discovered by:\n- XlabAI Team of Tencent Xuanwu Lab\n- Atuin Automated Vulnerability Discovery Engine\n\nIf there are questions regarding the vulnerability details, please feel free to reach out for further discussion at xlabai@tencent.com.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/alist-org/alist/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.57.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AlistGo/alist/security/advisories/GHSA-x4q4-7phh-42j9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25161"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlistGo/alist/commit/b188288525b9a35c76535139311e7c036dab057e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AlistGo/alist"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsbatch.go#L188-L189"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlistGo/alist/blob/b4d9beb49cba399842a54fcc33bc95a4a09b7bd4/server/handles/fsmanage.go#L165-L166"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-04T18:52:23Z",
    "nvd_published_at" : "2026-02-04T20:16:06Z"
  }
}