GHSA-CPRC-WHX4-V3F5
Unauthenticated SSRF via azure RemoteConf type bypasses the FetchAndWriteNeedle endpoint guard
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-CPRC-WHX4-V3F5 divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
`VolumeServer.FetchAndWriteNeedle` fetches a caller-supplied remote endpoint. CVE-2026-73080 (GHSA-87fv-vqqr-m4jr) added an SSRF endpoint deny-list + rebinding-safe pinned dialer, and the follow-up refactor routes the guard through `S3CompatibleEndpoint(remoteConf)`. The `azure` backend has no `case "azure"` in that switch, so it takes the unguarded `else` branch and reaches the azblob download sink with an attacker-supplied endpoint. This is a DISTINCT variant from GHSA-8wr4-8f39-p7x2 (which covers only the 9 S3-SDK backends via `aws-sdk-go`): azure uses a different SDK (`azure-sdk-for-go/.../azblob`), a different field (`AzureEndpoint`), a different constructor (`NewAzBlobClient`), and requires a different fix.
## Root Cause
`weed/server/volume_grpc_remote.go`: `endpoint, isS3Compatible = s3remote.S3CompatibleEndpoint(remoteConf)` (line 244); the deny-list + guarded dialer run only inside `if !vs.AllowUntrustedRemoteEndpoints && isS3Compatible` (line 249). `s3CompatibleClientOptions` (`weed/remote_storage/s3/s3_storage_client.go:68`) switches on `conf.Type` with cases for `s3, aliyun, b2, baidu, contabo, filebase, storj, tencent, wasabi` — no `azure` — so `isS3Compatible=false` and azure falls to the `else` at line 260: `remote_storage.GetRemoteStorage(remoteConf)` → `azureRemoteStorageMaker.Make` → `NewAzBlobClient(accountName, accountKey, clientId, conf.AzureEndpoint)`. The only endpoint validation is `azureServiceURL` (`weed/remote_storage/azure/azure_credentials.go:71-84`), which checks solely `url.Parse` success, `Scheme=="https"`, and non-empty `Hostname()`. No loopback / link-local / RFC1918 / IMDS deny-list exists on this path (contrast `checkBlockedIP`, wired only into the S3 branch). `remoteConf := req.RemoteConf` is read directly from the gRPC request, so type and endpoint are request-time attacker-controlled.
## Impact
Unauthenticated (default deployment) blind SSRF: an attacker coerces the volume server into opening TCP+TLS connections to arbitrary internal hosts/ports and distinguishes connect-refused / TLS-failure / HTTP-status via the RPC error string — an internal-network reachability/port-scan error oracle. Constrained relative to CVE-2026-73080: `https`-only (`azureServiceURL` rejects `http://`), so IMDSv1 credential theft is not achievable; the fetched bytes are written to a local needle and success additionally requires `len(data)==req.Size`, so straightforward body read-back is not the primary primitive. Calibrated MEDIUM.
## Proof of Concept
Single unauthenticated gRPC `FetchAndWriteNeedle` to `volumeserver:18080` with an existing `VolumeId`, `RemoteConf{Type:"azure", AzureAccountName:"aaaa", AzureAccountKey:"AAAA", AzureEndpoint:"https://169.254.169.254/"}`, `RemoteLocation{Bucket:"probe", Path:"/x"}`. The server dials `169.254.169.254:443`; the returned error distinguishes reachability. Use a valid-base64 account key (e.g. `"AAAA"`) so `NewSharedKeyCredential` succeeds locally before the dial. No non-default config required.
## Attack Chain
1. Entry — unauthenticated gRPC `FetchAndWriteNeedle` with `RemoteConf{Type:"azure", AzureEndpoint:"https://169.254.169.254/", AzureAccountName:"aaaa", AzureAccountKey:"AAAA"}`.
- Guard: `checkGrpcAdminAuth` (`volume_grpc_admin.go:43`) → peer-IP whitelist.
- Bypass proof: default `-whiteList ""` → `util.StringSplit("")` returns `nil` (`fullpath.go:147-149`) → `isEmptyWhiteList=true` (`guard.go:188`) → `IsWhiteListed` returns `true` for every peer (`guard.go:137`). Same default posture under which CVE-2026-73080 was accepted.
2. Volume precondition — supply a valid existing `VolumeId`.
- Guard: `vs.store.GetVolume` existence check (`volume_grpc_remote.go:230-233`).
- Bypass proof: volume IDs are small sequential integers; any live volume server has ≥1. Weak precondition, identical to CVE-2026-73080.
3. Branch routing — `Type:"azure"`.
- Guard: `S3CompatibleEndpoint(remoteConf)` gating `validateRemoteEndpoint` + `newGuardedHTTPClient` (deny-list + guarded dialer), applied only when `isS3Compatible` (`volume_grpc_remote.go:249`).
- Bypass proof: `s3CompatibleClientOptions` switch (`s3_storage_client.go:68`) has cases `s3/aliyun/b2/baidu/contabo/filebase/storj/tencent/wasabi` and no `azure` → returns `("",false)` → guarded block skipped → `else` at line 260 `remote_storage.GetRemoteStorage(remoteConf)`.
4. Endpoint validation — `NewAzBlobClient(...,conf.AzureEndpoint)` → `azureServiceURL` (`azure_credentials.go:71`).
- Guard: `azureServiceURL`.
- Bypass proof: enforces only `url.Parse` success, `Scheme=="https"`, `Hostname()!=""`. `https://169.254.169.254/`, `https://10.0.0.5/`, `https://127.0.0.1:6443/` all pass. No loopback/link-local/RFC1918/IMDS check on this path (`checkBlockedIP` wired only into the S3 branch). Account name `^[a-z0-9]{3,24}$` — `"aaaa"` passes; `NewSharedKeyCredential` only base64-decodes the key locally (no network), and `"AAAA"` is valid base64.
5. Sink — `client.ReadFile`/`ReadFileWithConcurrency` → `blobClient.DownloadBuffer` (`azure_storage_client.go:345`) opens TCP+TLS to the attacker's host:port. The dial (and its distinguishing error at `volume_grpc_remote.go` post-read) occurs BEFORE the `len(data)==req.Size` success check.
6. Impact — unauthenticated blind SSRF: internal host/port reachability probing via connect + error oracle. https-only; no IMDSv1 cred theft.
## Bypass Evidence
- `git show 5b51948 --name-only | grep -i azure` → empty (sibling S3-family fix never touched azure).
- `s3CompatibleClientOptions` switch (`s3_storage_client.go:68`) has no `case "azure"` (verified on HEAD).
- `azureServiceURL` (`azure_credentials.go:71-84`) on release tag 4.41 validates only `Scheme=="https"` + non-empty `Hostname()`; no IP deny-list.
- Empty whitelist ⇒ `IsWhiteListed==true` (`guard.go`), reachable unauthenticated in default config exactly like CVE-2026-73080.
- GHSA-8wr4-8f39-p7x2's own description enumerates only the 9 S3-SDK-family types; azure is out of scope → DISTINCT, not duplicate.
## Affected Versions
`<= 4.41` (verified present on the latest release tag `4.41` and on HEAD; sibling fix `5b51948` present on HEAD does not cover the azure path).
## Suggested Fix
Apply the endpoint deny-list and pinned/rebinding-safe dialer to the azure backend as well: either wrap the azblob client with an `azcore.ClientOptions.Transport` around `newGuardedHTTPClient`, or add a `checkBlockedIP`-equivalent validation inside `azureServiceURL`. More generally, gate the guard on "any maker that dials a caller-supplied endpoint" rather than membership in the S3-compatible switch.
---
Reported by zx (Jace) — GitHub: @manus-use
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-cprc-whx4-v3f5Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
