/

CVE-2026-25643

Severity:

CRITICAL RISK

(9.1)

OS Command Injection in Frigate go2rtc Stream Configuration

CVE-2026-25643

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-250, CWE-269, CWE-668

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical OS command injection vulnerability in Frigate's go2rtc integration allows arbitrary system commands to be executed via unsanitized values in config.yaml using the exec: directive.

In environments where an attacker has administrative access or where the Frigate instance is exposed to the internet without authentication, this flaw can be used to gain full remote command execution on the host system.

Affected context

The vulnerability occurs in Frigate deployments that integrate with go2rtc and accept dynamic video stream configuration through config.yaml.

It is relevant when:

  • The exec: directive is available in the go2rtc stream configuration
  • Values from config.yaml are passed to the underlying system command layer without sanitization or restriction
  • Administrative users (or anyone, if exposed without auth) can modify stream configuration

The issue is particularly risky for self-hosted or containerized Frigate setups where the service account has broad system or Docker host privileges.

Exploit preconditions

  • Attack surface: Frigate/go2rtc configuration interface (config.yaml), typically via the web UI, API, or direct file access.
  • Required access:
  • Administrative access to Frigate, OR
  • Unauthenticated access if the installation is exposed publicly with no access controls, effectively granting administrative capabilities.
  • Trigger point: The go2rtc service processes the video stream configuration and executes commands specified with the exec: directive.
  • Why exploitation is possible: User-controlled data from config.yaml is trusted and passed into command execution without validation, escaping, or restriction, allowing arbitrary shell commands to be injected and run by the go2rtc process under its current privileges.

Why this happens

The root cause is an OS command injection flaw where configuration values are treated as trusted command content.

Frigate's integration with go2rtc allows stream definitions to include an exec: directive, which is passed to the operating system for execution without sanitization, validation, or proper separation of data from control.

This corresponds to CWE-78: Improper Neutralization of Special Elements used in an OS Command, combined with excessive trust in administrative configuration paths (CWE-250/CWE-269/CWE-668).

Conceptually, the design assumes that configuration input is inherently safe, resulting in a pattern where configuration fields directly control executable command strings.

Potential impact

  • Full remote execution of arbitrary OS commands under the privileges of the Frigate/go2rtc process
  • Installation of malware, backdoors, or persistence mechanisms on the host
  • Exfiltration of sensitive data from the host system or connected storage
  • Pivoting to other internal services or infrastructure reachable from the Frigate host
  • Manipulation or destruction of recorded video evidence and configuration data
  • Abuse of host resources for tasks such as cryptomining or launching further attacks

General mitigation guidance

Mitigation focuses on breaking the direct link between user-controlled configuration and unrestricted command execution.

Recommended patterns include:

  • Constrain execution paths: Replace generic exec:-driven command invocation with predefined, parameterized actions that map configuration options to a small, fixed set of safe operations.
  • Eliminate inline shell composition: Avoid constructing shell command strings from configuration values; instead use APIs or structured argument lists that do not invoke a shell.
  • Validate and normalize configuration: Apply strict schema validation to configuration fields, rejecting values that contain shell metacharacters or that deviate from expected patterns (e.g., URLs, file paths, or enumerated options only).
  • Apply least-privilege: Run Frigate/go2rtc processes under a dedicated, minimally privileged account with limited filesystem and network access, reducing the blast radius if an injection occurs.
  • Harden access control: Require authentication for administrative operations and avoid exposing configuration management interfaces directly to the internet.
  • Segregate sensitive capabilities: Place components that must perform system-level actions behind internal, well-defined interfaces rather than giving configuration the ability to call arbitrary commands.

How teams detect issues like this

Detection typically involves inspecting both configuration handling and runtime behavior.

Potential strategies:

  • Static analysis and code scanning:
  • Flag patterns where configuration values are passed directly into command execution functions or shell invocations.
  • Define rules for unsafe use of APIs that spawn processes (e.g., calls that accept raw strings instead of argument arrays).
  • Configuration review and policy checks:
  • Enforce policies that prevent use of arbitrary exec: directives or limit them to vetted patterns.
  • Use CI/CD hooks to validate config.yaml against a security-focused schema before deployment.
  • Runtime monitoring:
  • Monitor for unusual child processes spawned by the Frigate/go2rtc service.
  • Track command-line arguments for unexpected executables or shell metacharacters originating from configuration-controlled paths.
  • Log analysis:
  • Centralize and parse application and system logs for anomalous command executions or configuration changes related to stream definitions.

Automated SAST/IAST tools and configuration scanners can assist by highlighting direct command execution driven by user-configurable values and by enforcing organization-specific security rules around configuration files.

Sources

SourceLink
github.comgithub.com/blakeblackshear/frigate/releases/tag/v0.16.4
github.comgithub.com/blakeblackshear/frigate/security/advisories/GHSA-4c97-5jmr-8f6x

Frequently asked

questions

Exploitability depends on how Frigate is deployed. In locked-down environments where only trusted administrators can modify config.yaml, exploitation is limited to insider or compromised-admin scenarios. If Frigate is exposed to the internet without authentication, anyone who can reach the interface may gain effective administrative control and exploit the issue.

An attacker needs the ability to change video stream configuration, typically via administrative access to the Frigate UI/API or direct write access to config.yaml. Misconfigured deployments that allow unauthenticated access to the admin interface effectively remove this barrier.

The most robust pattern is to remove or strictly limit free-form command execution from configuration. Instead, map configuration options to a fixed set of safe operations, use non-shell process invocation APIs with structured arguments, and validate configuration against a strict schema that prevents arbitrary command content.

Treat configuration as untrusted input, even for admin-only features. Avoid designs where configuration or user input directly controls command strings or shell invocations. Enforce least-privilege for service accounts, require strong authentication for administrative interfaces, and integrate static analysis and configuration validation into the development and deployment pipeline to catch command injection patterns early.

Find out what's already
exploitable in your codebase.