github.com/alist-org/alist/v3
Affected
- introduced
0, fixed3.57.0(semver)
Fixed versions
3.57.0
Fix
- Fixed version
3.57.0go get github.com/alist-org/alist/[email protected]
Advisory
Also known as: CVE-2026-25161, GO-2026-4415
Alist vulnerable to Path Traversal in multiple file operation handlers
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.
func FsRemove(c *gin.Context) {
// ...
for _, name := range req.Names {
err := fs.Remove(c, stdpath.Join(reqDir, name))
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)
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
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.
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:
Consequences:
Credit
This vulnerability was discovered by:
If there are questions regarding the vulnerability details, please feel free to reach out for further discussion at [email protected].
High Basis: The source's own band: HIGH
0, fixed 3.57.0 (semver)3.57.0
3.57.0go get github.com/alist-org/alist/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0