/

CVE-2026-102607

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in ZoneMinder Export

CVE-2026-102607

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

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 operating system command injection vulnerability in its event export workflow, where attacker-controlled export parameters are incorporated into shell commands without adequate neutralization. An authenticated user with event or snapshot viewing permissions may execute arbitrary commands as the web server account when the export request meets the required CSRF and option conditions.

ZoneMinder contains an operating system command injection vulnerability in its event export workflow, where attacker-controlled export parameters are incorporated into shell commands without adequate neutralization. An authenticated user with event or snapshot viewing permissions may execute arbitrary commands as the web server account when the export request meets the required CSRF and option conditions.

Affected context

The issue occurs in ZoneMinder versions before 1.38.3 when the event export functionality processes the exportFile request parameter through exportEvents() and related export components. Risk depends on the application invoking shell utilities through exec() while allowing user-influenced values to reach command arguments without strong separation between data and executable command syntax.

The issue occurs in ZoneMinder versions before 1.38.3 when the event export functionality processes the exportFile request parameter through exportEvents() and related export components. Risk depends on the application invoking shell utilities through exec() while allowing user-influenced values to reach command arguments without strong separation between data and executable command syntax.

Exploit preconditions

  • Attack surface: Authenticated event export functionality exposed through the web application
  • Required access: An account with View Events or View Snapshots permission
  • Trigger point: Submission of an event export request with export functionality enabled
  • Additional conditions: A valid CSRF token and exportDetail enabled
  • Why exploitation is possible: The exportFile value reaches a shell command argument without sufficient metacharacter neutralization, allowing command interpretation by the operating system
  • Attack surface: Authenticated event export functionality exposed through the web application
  • Required access: An account with View Events or View Snapshots permission
  • Trigger point: Submission of an event export request with export functionality enabled
  • Additional conditions: A valid CSRF token and exportDetail enabled
  • Why exploitation is possible: The exportFile value reaches a shell command argument without sufficient metacharacter neutralization, allowing command interpretation by the operating system

Why this happens

The vulnerability results from constructing shell commands by concatenating attacker-controlled input and executing the resulting string through a shell-capable process interface. This insecure pattern allows data intended to represent a file or directory path to alter command parsing when shell metacharacters are present. The behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

The vulnerability results from constructing shell commands by concatenating attacker-controlled input and executing the resulting string through a shell-capable process interface. This insecure pattern allows data intended to represent a file or directory path to alter command parsing when shell metacharacters are present. The behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker may execute arbitrary operating system commands
  • The web server account could be compromised
  • Sensitive camera, event, or system data could be accessed or modified
  • The application environment could be used for further lateral movement
  • Availability or integrity of monitoring services could be disrupted
  • An attacker may execute arbitrary operating system commands
  • The web server account could be compromised
  • Sensitive camera, event, or system data could be accessed or modified
  • The application environment could be used for further lateral movement
  • Availability or integrity of monitoring services could be disrupted

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation of user-controlled values and reducing the trust placed in export parameters.

Common defensive patterns include:

  • Use direct process APIs with argument arrays instead of shell command strings
  • Apply strict allowlists for permitted export formats, paths, and filenames
  • Keep user-controlled values separate from executable command structure
  • Canonicalize and validate filesystem paths against approved directories
  • Run web workers with the minimum filesystem and operating system privileges
  • Restrict access to event export functionality according to least privilege
  • Add layered request validation and preserve CSRF protections

Mitigation generally focuses on eliminating shell interpretation of user-controlled values and reducing the trust placed in export parameters.

Common defensive patterns include:

  • Use direct process APIs with argument arrays instead of shell command strings
  • Apply strict allowlists for permitted export formats, paths, and filenames
  • Keep user-controlled values separate from executable command structure
  • Canonicalize and validate filesystem paths against approved directories
  • Run web workers with the minimum filesystem and operating system privileges
  • Restrict access to event export functionality according to least privilege
  • Add layered request validation and preserve CSRF protections

How teams detect issues like this

Organizations can look for command injection risks through:

  • Static analysis rules identifying exec() or shell invocation with concatenated request data
  • Code review checks for user-controlled values entering command strings or subprocess calls
  • Tests that verify export parameters are passed as isolated arguments rather than shell syntax
  • Runtime monitoring for unexpected child processes launched by the web server
  • Policy enforcement that prohibits shell execution for routine file archival operations
  • Automated security review tools that flag untrusted input flows into operating system command APIs

Organizations can look for command injection risks through:

  • Static analysis rules identifying exec() or shell invocation with concatenated request data
  • Code review checks for user-controlled values entering command strings or subprocess calls
  • Tests that verify export parameters are passed as isolated arguments rather than shell syntax
  • Runtime monitoring for unexpected child processes launched by the web server
  • Policy enforcement that prohibits shell execution for routine file archival operations
  • Automated security review tools that flag untrusted input flows into operating system command APIs

Sources

SourceLink
github.comgithub.com/ZoneMinder/zoneminder/commit/548ed87d47a49c17b4c842f6fee8a08660deb427
github.comgithub.com/ZoneMinder/zoneminder/commit/605f962b7b6ba7f5780b3e6715b5418b8b2addca
github.comgithub.com/ZoneMinder/zoneminder/releases/tag/1.38.3
github.comgithub.com/ZoneMinder/zoneminder/security/advisories/GHSA-7j62-cjxp-3cj5

Frequently asked

questions

It can be exploited through the ZoneMinder web application when an attacker has the required authenticated permissions and can submit a qualifying event export request.

The attacker needs an account with View Events or View Snapshots permission, along with the conditions required by the export workflow, including a valid CSRF token.

Avoid shell command construction with user-controlled data. Prefer direct process APIs with fixed executable paths, separated arguments, strict allowlists, and validated export destinations.

Apply least privilege to application accounts, review all request-to-process execution data flows, enforce secure coding rules for subprocess usage, and monitor web-server child-process activity.

It can be exploited through the ZoneMinder web application when an attacker has the required authenticated permissions and can submit a qualifying event export request.

The attacker needs an account with View Events or View Snapshots permission, along with the conditions required by the export workflow, including a valid CSRF token.

Avoid shell command construction with user-controlled data. Prefer direct process APIs with fixed executable paths, separated arguments, strict allowlists, and validated export destinations.

Apply least privilege to application accounts, review all request-to-process execution data flows, enforce secure coding rules for subprocess usage, and monitor web-server child-process activity.

Find out what's already
exploitable in your codebase.