llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · frigate

GHSA-PJJX-9F4V-F8JX

Zero-area face detection crashes the shared, unsupervised EmbeddingMaintainer thread, silently disabling face recognition/LPR/semantic-search/GenAI-description for ALL cameras

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

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
4.2
Media
CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición70 dDesde la divulgación, 12 sept 2026, 8:45 a. m.
Detección67 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, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Ni fuego ni humo: solo una tarea pendiente.Revisa, agenda, parchea. El clásico de siempre.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
12 sept 26
18 nov 26
21 nov 26
12 sept 26
30 sept 26
17 oct 26
4 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-PJJX-9F4V-F8JX divulgada · CVSS 4.2 (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

Vulnerability Details

File: `frigate/data_processing/real_time/face.py` (root cause), `frigate/embeddings/maintainer.py` (unsupervised call site)
CWE: CWE-1284 (Improper Validation of Specified Quantity in Input), CWE-248 (Uncaught Exception)

Root Cause

`FaceRealTimeProcessor.process_frame()` (`frigate/data_processing/real_time/face.py:257-310`)
gates on a face box's RAW, unclamped area:

if (
    not face_box
    or area(face_box) < self.config.cameras[camera].face_recognition.min_area
):
    return

face_frame = face_frame[
    max(0, face_box[1]) : min(frame.shape[0], face_box[3]),
    max(0, face_box[0]) : min(frame.shape[1], face_box[2]),
]
...
self.person_face_history[id].append(
    (sub_label, score, face_frame.shape[0] * face_frame.shape[1])
)

A detector-produced box that is nominally large (passing the raw `area()` check, computed as
`(x2-x1+1)*(y2-y1+1)` with no reference to actual frame bounds) but positioned mostly/entirely
outside the frame clamps to an EMPTY crop — `face_frame.shape[0] * face_frame.shape[1]` can be
exactly `0` even though the check that was supposed to filter this out already passed.

That `face_area = 0` reaches `weighted_average()` (`frigate/data_processing/real_time/face.py:462-516`):

for name, score, face_area in results_list:
    ...
    weight = min(face_area, max_weight)          # 0 if face_area == 0
    weight *= (score - self.face_config.unknown_score) * 10
    weighted_scores[name] += score * weight
    total_weights[name] += weight                 # can sum to exactly 0.0
...
best_name = max(weighted_scores, key=weighted_scores.get)
if counts[best_name] < self.face_config.min_faces:   # default min_faces = 1
    return None, 0.0
...
weighted_average = weighted_scores[best_name] / total_weights[best_name]   # ZeroDivisionError, uncaught

With `min_faces` defaulting to `1`, a single degenerate detection is sufficient to reach the
unguarded division.

Blast Radius (why this matters more than a typical uncaught exception)

`process_frame()` is called from `EmbeddingMaintainer._process_frame_updates()`
(`frigate/embeddings/maintainer.py:449`), with no surrounding try/except (the only try/except in
that function guards an unrelated `FileNotFoundError` on frame lookup), inside
`EmbeddingMaintainer.run()`'s main loop. `EmbeddingMaintainer` is a `threading.Thread`
(`class EmbeddingMaintainer(threading.Thread):`, line 75) — not a supervised
`multiprocessing.Process`. An uncaught exception inside a Python thread's `run()` silently kills
only that thread; nothing restarts it. Confirmed via code search: neither `frigate/watchdog.py`
(which only tracks `detectors: dict[str, ObjectDetectProcess]`) nor `frigate/app.py` references
`EmbeddingMaintainer`/`embeddings_maintainer` in any supervision or restart context.

`EmbeddingMaintainer` is the SINGLE SHARED thread handling face recognition, license plate
recognition, semantic search (`/events/search`, `/events/explore`), embedding-based triggers,
and GenAI review-description generation for every configured camera. One degenerate
detection on any single camera permanently and silently disables ALL of these features
system-wide (not just for that camera) until a full manual Frigate restart.

Attack Scenario

Prerequisites: face recognition enabled. A detector (misbehaving hardware plugin, adversarial or
corrupted model input, or a misconfigured model producing badly-scaled coordinates) emits a
face-box detection positioned mostly/fully outside the actual camera frame, with large nominal
(pre-clamp) dimensions.

  1. `area(face_box) >= min_area` passes (raw box area is large).
  2. The clamped crop is empty -> `face_area = 0` recorded in `person_face_history`.
  3. `weighted_average()` is called with this single zero-area entry (`min_faces=1` needs no more).
  4. `ZeroDivisionError`, uncaught, kills the `EmbeddingMaintainer` thread.
  5. Face recognition, LPR, semantic search, and GenAI descriptions silently stop working for
Impact

Every camera/user on the instance is affected (single shared thread, not per-camera) - broader
blast radius than the previously-reported detection-pipeline crash findings
(GHSA-g7v4-mvcq-6pgp, GHSA-6hj4-39pc-323x) which are scoped to one camera or are auto-recovered
by `FrigateWatchdog` respectively. This finding's affected component (`EmbeddingMaintainer`,
a thread) has no equivalent supervision at all.

Recommended Fix
  1. Fix the `min_area` check to test the actual post-clamp crop area, not the raw box area:
clamped_area = max(0, min(frame.shape[0], face_box[3]) - max(0, face_box[1])) * \
               max(0, min(frame.shape[1], face_box[2]) - max(0, face_box[0]))
if not face_box or clamped_area < self.config.cameras[camera].face_recognition.min_area:
    return
  1. Guard the division in `weighted_average()` regardless (defense in depth):
if total_weights[best_name] <= 0:
    return None, 0.0
weighted_average = weighted_scores[best_name] / total_weights[best_name]

3. Architecturally: wrap `EmbeddingMaintainer.run()`'s per-iteration work in a try/except that
logs and continues rather than letting any single processor's exception kill the whole thread.

Verification

Dynamically confirmed via a real-code-import reproduction calling the actual, unmodified
`FaceRealTimeProcessor.weighted_average()`:

import frigate.embeddings  # forces correct module init order
from frigate.data_processing.real_time.face import FaceRealTimeProcessor
import types

proc = object.__new__(FaceRealTimeProcessor)
proc.face_config = types.SimpleNamespace(unknown_score=0.8, min_faces=1)
results_list = [('alice', 0.95, 0)]
proc.weighted_average(results_list)

Result: `ZeroDivisionError: float division by zero`, reproducible deterministically. Blast-radius
claim (unsupervised thread) independently confirmed via code search of `watchdog.py`/`app.py`
showing no reference to `EmbeddingMaintainer` in any restart/supervision path.

Vector CVSS 3.1

Desglose de métricas

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

Rangos afectados

Afectada Corregida Última
frigate≤ 0.17.2
0.7.0
0.17.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypifrigate
Sin parche — — 0.7.0 afectada
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-pjjx-9f4v-f8jx

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