GitHub Security Advisory: GHSA-xh8f-g2qw-gcm7
Package: github.com/minio/minio (GO)
Severity: MODERATE (CVSS 0.0)
CWE: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Vulnerable versions: >= 0.0.0[PII_REDACTED]5452, < 0.0.0[PII_REDACTED]3245
Patched in: 0.0.0[PII_REDACTED]3245

Summary: MinIO vulnerable to Path Traversal via msgpack Body in `ReadMultiple` Storage-REST Endpoint

Details:
### Impact

_What kind of vulnerability is it? Who is impacted?_

A path traversal vulnerability in MinIO's `ReadMultiple` internode storage-REST
endpoint allows a caller holding the cluster root JWT to read files from
outside the configured drive roots, bounded only by the MinIO process UID.

Distributed-erasure (multi-node) MinIO deployments are impacted. Single-node
standalone deployments do not register the route and are not affected. The
attack requires an HS512 JWT signed with `MINIO_ROOT_PASSWORD` and carrying
`accessKey = MINIO_ROOT_USER` — the same secret every peer in the cluster
holds to authenticate internode traffic, so a compromised peer or any actor in
possession of the root credential can mint one.

The `ReadMultiple` handler (`cmd/storage-rest-server.go`) decodes a msgpack
`ReadMultipleReq` body containing `Bucket`, `Prefix`, and `Files` fields and
forwards them to `xlStorage.ReadMultiple` (`cmd/xl-storage.go`) without
validation:

```go
volumeDir := pathJoin(s.drivePath, req.Bucket)          // traversal resolves here
for _, f := range req.Files {
    fullPath := pathJoin(volumeDir, req.Prefix, f)
    data, mt, err = s.readAllDataWithDMTime(ctx, req.Bucket, volumeDir, fullPath)
}
```

`pathJoin` calls `path.Clean`, which resolves `..` components and produces an
absolute path anywhere on the filesystem — it is not a root jail. The global
`setRequestValidityMiddleware` rejects `..` in `r.URL.Path` and `r.Form` but
does not inspect request bodies, so msgpack-encoded traversal bypasses it.
Sibling storage methods (`StatInfoFile`, `ReadFileHandler`, `ReadVersion`)
validate their volume argument through `s.getVolDir(volume)`, which rejects
`..`; `ReadMultiple` skips this call.

The attacker sends `POST /minio/storage/{drivePath}/v63/rmpl` with a
msgpack-encoded body carrying `../` sequences in the `Bucket` field. The
server opens the resulting path via `os.OpenFile` with `O_RDONLY|O_NOATIME`
and returns its contents in the msgpack response stream.

**Impact by deployment:**

- **Bare-metal with `User=minio` in the systemd unit** — the `O_NOATIME`
  ownership check bounds the read to files owned by the MinIO UID. Reachable
  secrets include TLS private keys, KMS/KES key material, systemd credentials,
  and data belonging to other tenants sharing the same UID on the host.
  Secrets leaked this way persist across cluster credential rotation.

- **Containerized running as UID 0** (the historical default for the official
  Docker image, `docker-compose` examples, and Helm charts without
  `securityContext.runAsNonRoot`) — the primitive escalates to arbitrary
  host-filesystem disclosure: `/etc/shadow`, `/root/**`, Kubernetes
  service-account tokens, cloud-init metadata caches.

**Affected components:** `cmd/storage-rest-server.go` (`ReadMultiple` handler),
`cmd/xl-storage.go` (`xlStorage.ReadMultiple`).

**CWE:** CWE-22 (Improper Limitation of a Pathname to a Restricted Directory
— 'Path Traversal')

**CVSS v4.0 Score:** 6.9 (Medium)

**V