/

CVE-2026-102608

Severity:

CRITICAL RISK

(9.0)

OS Command Injection (CWE-78) in ZoneMinder Events

CVE-2026-102608

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

CRITICAL RISK

(9.0)

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

ZoneMinder contains an OS command injection vulnerability in event export processing because a monitor name is manually quoted before being passed to shell commands. An attacker who can store a monitor name containing shell metacharacters and whose account can export that monitor's events may execute arbitrary commands as the web server user.

ZoneMinder contains an OS command injection vulnerability in event export processing because a monitor name is manually quoted before being passed to shell commands. An attacker who can store a monitor name containing shell metacharacters and whose account can export that monitor's events may execute arbitrary commands as the web server user.

Affected context

The issue occurs in ZoneMinder deployments that use event export functionality and permit users with monitor-create or monitor-edit permissions to set monitor names. Risk arises when a user with Events View permission exports events for a monitor whose stored name contains shell-significant characters, allowing the value to reach command construction for media concatenation and archive creation.

The issue occurs in ZoneMinder deployments that use event export functionality and permit users with monitor-create or monitor-edit permissions to set monitor names. Risk arises when a user with Events View permission exports events for a monitor whose stored name contains shell-significant characters, allowing the value to reach command construction for media concatenation and archive creation.

Exploit preconditions

  • Attack surface: ZoneMinder web application event export functionality
  • Required access: Permission to create or edit a monitor name, plus access to view and export that monitor's events
  • Trigger point: Event export processing through media and archive command construction
  • Why exploitation is possible: The monitor name is manually enclosed in single quotes rather than safely escaped for shell use, allowing shell metacharacters in stored input to alter command interpretation
  • Attack surface: ZoneMinder web application event export functionality
  • Required access: Permission to create or edit a monitor name, plus access to view and export that monitor's events
  • Trigger point: Event export processing through media and archive command construction
  • Why exploitation is possible: The monitor name is manually enclosed in single quotes rather than safely escaped for shell use, allowing shell metacharacters in stored input to alter command interpretation

Why this happens

The vulnerability results from constructing shell commands with user-controlled monitor names and relying on manual quoting instead of a context-aware argument-escaping mechanism. Because shell parsing can treat embedded metacharacters as operators or separators, attacker-controlled data may become executable command syntax rather than remaining a literal argument. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

The vulnerability results from constructing shell commands with user-controlled monitor names and relying on manual quoting instead of a context-aware argument-escaping mechanism. Because shell parsing can treat embedded metacharacters as operators or separators, attacker-controlled data may become executable command syntax rather than remaining a literal argument. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • Arbitrary commands may execute with the privileges of the web server user
  • Attackers could access, alter, or delete application data
  • System credentials and locally accessible secrets could be exposed
  • The ZoneMinder host could be used for persistence or lateral movement
  • Recorded media and exported archives could be modified or removed
  • Arbitrary commands may execute with the privileges of the web server user
  • Attackers could access, alter, or delete application data
  • System credentials and locally accessible secrets could be exposed
  • The ZoneMinder host could be used for persistence or lateral movement
  • Recorded media and exported archives could be modified or removed

General mitigation guidance

Mitigation should focus on removing shell interpretation from application workflows and reducing trust in user-controlled monitor metadata.

Common defensive patterns include:

  • Invoke media-processing and archive functionality through argument arrays or library APIs instead of shell command strings
  • Apply dedicated, context-appropriate argument escaping when a shell cannot be avoided
  • Validate monitor names against a restrictive allowlist of expected characters and length
  • Keep user-controlled names separate from command syntax and executable paths
  • Run the web application with the least privileges required to perform its functions
  • Restrict access to event-export capabilities and protect sensitive files from the web-server account

Mitigation should focus on removing shell interpretation from application workflows and reducing trust in user-controlled monitor metadata.

Common defensive patterns include:

  • Invoke media-processing and archive functionality through argument arrays or library APIs instead of shell command strings
  • Apply dedicated, context-appropriate argument escaping when a shell cannot be avoided
  • Validate monitor names against a restrictive allowlist of expected characters and length
  • Keep user-controlled names separate from command syntax and executable paths
  • Run the web application with the least privileges required to perform its functions
  • Restrict access to event-export capabilities and protect sensitive files from the web-server account

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying shell execution APIs that interpolate database-backed or request-derived values
  • Code review checks for manual quote wrapping, string concatenation, or formatting used to build commands
  • Tests that verify special characters remain data when passed to media and archive operations
  • Runtime monitoring for unexpected child processes launched by the web server
  • Application and host policies that alert on abnormal command execution, archive creation, or access to sensitive files

Automated code review and software composition analysis tools may help identify risky command-construction patterns, but findings should be validated against the actual execution path.

Organizations can look for this weakness through:

  • Static analysis rules identifying shell execution APIs that interpolate database-backed or request-derived values
  • Code review checks for manual quote wrapping, string concatenation, or formatting used to build commands
  • Tests that verify special characters remain data when passed to media and archive operations
  • Runtime monitoring for unexpected child processes launched by the web server
  • Application and host policies that alert on abnormal command execution, archive creation, or access to sensitive files

Automated code review and software composition analysis tools may help identify risky command-construction patterns, but findings should be validated against the actual execution path.

Sources

SourceLink
github.comgithub.com/ZoneMinder/zoneminder/commit/2de2ae44a1d751bad4b020c5573b2d58c59c1525
github.comgithub.com/ZoneMinder/zoneminder/commit/b3a7c05f079c87badf4b0ce052da0acfd4047a4b
github.comgithub.com/ZoneMinder/zoneminder/commit/b5605e01c14354fc8e2dcae8cefd90c3674880d9
github.comgithub.com/ZoneMinder/zoneminder/releases/tag/1.38.3
github.comgithub.com/ZoneMinder/zoneminder/security/advisories/GHSA-88m4-hrgp-m9v3
scriptkittens.comscriptkittens.com/blog/two-sinks-one-shell

Frequently asked

questions

It can be exploitable through the ZoneMinder web application when the relevant permissions and event-export workflow are available. Exploitation does not necessarily require direct shell access to the host.

The attack path requires the ability to create or edit a monitor name and a way to export events for that monitor, including the applicable monitor and Events View permissions.

Avoid constructing shell command strings with user-controlled values. Prefer library APIs or process execution mechanisms that pass arguments as separate values, with strict validation and context-appropriate escaping as additional safeguards.

Treat database-stored names as untrusted input, review every shell execution boundary, apply least privilege to the web server, and use static analysis and runtime monitoring to detect unsafe command construction.

It can be exploitable through the ZoneMinder web application when the relevant permissions and event-export workflow are available. Exploitation does not necessarily require direct shell access to the host.

The attack path requires the ability to create or edit a monitor name and a way to export events for that monitor, including the applicable monitor and Events View permissions.

Avoid constructing shell command strings with user-controlled values. Prefer library APIs or process execution mechanisms that pass arguments as separate values, with strict validation and context-appropriate escaping as additional safeguards.

Treat database-stored names as untrusted input, review every shell execution boundary, apply least privilege to the web server, and use static analysis and runtime monitoring to detect unsafe command construction.

Find out what's already
exploitable in your codebase.