GHSA-JQ8H-9MJH-XV8F
Unauthenticated LifecycleDelete on SeaweedFS S3 internal gRPC port allows cross-bucket object/version deletion
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-JQ8H-9MJH-XV8F divulgada · CVSS 9.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
The SeaweedFS S3 server exposes an internal gRPC listener (default `0.0.0.0:<s3.port + 10000>`, i.e. `18333`) that hosts two services: `SeaweedS3IamCache` and `SeaweedS3LifecycleInternal`. Commit `70a26cb` (shipped in 4.46) added `checkAdminAuth` (Bearer JWT) to `SeaweedS3IamCache`, establishing that this listener is intended to require admin authentication. However, the sibling `SeaweedS3LifecycleInternal.LifecycleDelete` RPC on the *same* listener has zero authentication and its optimistic identity check is default-open. An unauthenticated network peer can invoke `LifecycleDelete` to destroy non-object-locked objects, versions, delete-markers, and in-progress multipart uploads across every bucket.
## Root Cause
1. Missing authentication on a critical RPC (CWE-306). `LifecycleDelete` (`weed/s3api/s3api_internal_lifecycle.go:22`) contains no `checkAdminAuth`/Bearer/Authorization check (grep count = 0), whereas the co-located `SeaweedS3IamCache` handlers contain 11. The `grpcS` server uses only `requestIDUnaryInterceptor` (`weed/util/grpc_client_server.go:200`), and `LoadServerTLS("grpc.s3")` returns `(nil,nil)` when no cert is configured (plaintext) — so the RPC is unauthenticated end-to-end.
2. Default-open identity CAS (CWE-862). `identityMatches(live, want)` returns `true` when `want == nil` (`s3api_internal_lifecycle.go:329-331`). `ExpectedIdentity` is optional proto field 20, so an attacker simply omits it and the compare-and-swap guard passes unconditionally.
## Impact
Unauthenticated destruction (integrity + availability) of all non-object-locked objects, versions, delete-markers, and in-progress multipart uploads across all buckets, reachable from any network position that can connect to the S3 internal gRPC port. Object-lock retention / legal-hold objects remain protected by `enforceObjectLockProtections` (line 47) — a partial guard; the majority of objects in typical deployments are unlocked.
## Proof of Concept
1. Connect (plaintext gRPC) to `<s3-host>:18333`.
2. Call `NewSeaweedS3LifecycleInternalClient(...).LifecycleDelete(&LifecycleDeleteRequest{Bucket:"victim", ObjectPath:"important.dat", ActionKind: EXPIRATION_DAYS /* ExpectedIdentity omitted */})`.
3. The object is deleted with no authentication.
## Attack Chain
1. Entry: unauth TCP → `0.0.0.0:18333` (`weed/command/s3.go:345-349`: `portGrpc = 10000 + s3.port`, `bindIp = "0.0.0.0"`) → `NewSeaweedS3LifecycleInternalClient` → `LifecycleDelete`.
- Guard: per-RPC auth / interceptor / TLS. Bypass proof: `checkAdminAuth|Bearer|Authorization` grep in the lifecycle handler = 0 (vs 11 in the guarded `SeaweedS3IamCache` sibling); `grpcS` uses only `requestIDUnaryInterceptor` (`grpc_client_server.go:200`); `LoadServerTLS("grpc.s3")` returns `(nil,nil)` → plaintext (`tls.go:79-81`).
2. Action: send `LifecycleDelete{Bucket, ObjectPath, ActionKind, ExpectedIdentity: nil}`.
- Guard: identity compare-and-swap. Bypass proof: `identityMatches(live, want)` returns `true` for `want==nil` (`s3api_internal_lifecycle.go:329-331`); `ExpectedIdentity` is optional proto field 20 → omitted.
3. Sink: `lifecycleDispatch` → `createDeleteMarker` / `deleteUnversionedObjectWithClient` / `deleteSpecificObjectVersion` → filer delete.
- Guard: object-lock only (`enforceObjectLockProtections`, line 47). Bypass proof: non-locked objects have no protection; handler returns `DONE`.
4. Impact: unauthenticated deletion of all non-object-locked objects/versions/delete-markers/MPUs across every bucket.
## Bypass Evidence
- `git show 4.46:weed/s3api/s3api_internal_lifecycle.go` → `LifecycleDelete` present, `checkAdminAuth` count = 0, `identityMatches` nil-branch present at line 329.
- `git merge-base --is-ancestor 70a26cb 4.46` → YES: the sibling `SeaweedS3IamCache` IS guarded in the shipped 4.46 release, so the parity asymmetry is real in production, not just on HEAD.
- Fix commit `70a26cb` file list = `s3api_server_grpc.go`, `propagating_store.go`, tests only — the lifecycle file is untouched.
- No existing SeaweedFS advisory mentions the lifecycle service (repo advisory grep = 0).
## Affected Versions
`>= 4.41` (S3 lifecycle internal gRPC service introduced) through `<= 4.46` (latest release; unfixed on HEAD `b3aace2`). Module path `github.com/seaweedfs/seaweedfs` unchanged.
## Suggested Fix
Add `checkAdminAuth` (the same Bearer-JWT guard introduced by `70a26cb` for `SeaweedS3IamCache`) to every `SeaweedS3LifecycleInternal` handler, and have the lifecycle worker/shell clients attach the admin token. Additionally, make the identity CAS fail-closed when `ExpectedIdentity` is absent.
---
Reported by zx (Jace) — GitHub: @manus-use
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-jq8h-9mjh-xv8fLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
