All vulnerabilities

Servers and applications

GHSA-vwwx-w898-9f4r

SFTP chroot escape via unescaped filename in upload URL allows cross-user data disclosure and deletion

Severity
Critical 9.9
Published
12 Sept 2026
Last changed
12 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.42
Weakness
Injection (CWE-74)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Sources
Project advisories (GitHub)

Description

The SFTP server confines each user to their home directory, but when uploading a file it builds the destination URL by concatenating the user-controlled filename into the HTTP request path without URL-encoding it. A filename containing ? is interpreted by the filer's raw HTTP API as a query string, allowing an authenticated SFTP user to inject cp.from / mv.from and read, move, or delete any other user's files.

In weed/sftpd/sftp_filer.go, putFile concatenates the filename directly into the URL:

The chroot check in toAbsolutePath (weed/sftpd/sftp_server.go) only resolves . / .. segments with path.Join and verifies the result stays under HomeDir. It does not reject ?, so a filename such as:

passes the chroot check, then becomes the URL:

which the HTTP client parses as URL.Path = /home/alice/steal and URL.RawQuery = cp.from=/home/bob/secret.txt.

From seaweedfs/seaweedfs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
SeaweedFSServers and applications · github:seaweedfs/seaweedfs
  • Every version before 4.42

About SeaweedFS

Fast distributed storage system for blobs, objects, files, and data lake, for billions of files. Blob store has O(1) disk seek, cloud tiering

From Wikidata, CC0 1.0.
Docker Hub pulls
42,221,853Docker Hub, 15 Nov 2026
GitHub stars
36,070GitHub, 15 Nov 2026
Forks
3,114GitHub, 15 Nov 2026
Latest release
4.53GitHub, 15 Nov 2026
Released
8 Nov 2026GitHub
License
Apache Software License 2.0Wikidata
Written in
GoWikidata
First released
21 Apr 2015Wikidata
First published on GitHub
14 Jul 2014GitHub

References