Every CVE Search/ Get API key

CVE-2025-60787

Duplicate Advisory: motionEye vulnerable to RCE via unsanitized motion config parameter

7.2 HighPublic exploitFix available

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
High
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

18.5%Up 18.1 points since Oct 4, 2025
90%50%10%1%

What each source reports

CVE List Score used 7.2

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Record
CVE-2025-60787
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20, CWE-78, CWE-116
Updated
2026-11-02
EUVDEUVD-2025-32486 7.2

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Record
EUVD-2025-32486
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-26f6-wm47-7h7j 7.2

Duplicate Advisory: motionEye vulnerable to RCE via unsanitized motion config parameter

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-j945-qm58-4gjx. This link is maintained to preserve external references.

Original Description

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Record
GHSA-26f6-wm47-7h7j
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
GitHub AdvisoriesGHSA-j945-qm58-4gjx 7.2

motionEye vulnerable to RCE via unsanitized motion config parameter

Summary

A command injection vulnerability in MotionEye allows attackers to achieve Remote Code Execution (RCE) by supplying malicious values in configuration fields exposed via the Web UI. Because MotionEye writes user-supplied values directly into Motion configuration files without sanitization, attackers can inject shell syntax that is executed when the Motion process restarts. This issue enables full takeover of the MotionEye container and potentially the host environment (depending on container privileges).

Details

Root Cause:

MotionEye accepts arbitrary strings from fields such as image_file_name and movie_filename in the Web UI. These are written directly into /etc/motioneye/camera-*.conf. When MotionEye restarts the Motion service (motionctl.start), the Motion binary reads this configuration. Because Motion treats these fields as shell-expandable, injected characters (e.g. $(), backticks) are interpreted as shell commands.

Vulnerability flow:

Dashboard (Web UI) ↓ ConfigHandler.set_config() ↓ camera-*.conf written ↓ motionctl.restart() ↓ Motion parses config → executes payload

Affected code:

The issue arises in how config.py handles user input before writing to config files. No sanitization or allowlisting is applied to filename fields.

Proof of Concept (PoC)

The following steps reproduce the Remote Code Execution (RCE) vulnerability in MotionEye.
Tested using the official Docker image.


Environment Setup

  1. Start MotionEye container
    Launch the vulnerable container:

    docker run -d --name motioneye -p 9999:8765 ghcr.io/motioneye-project/motioneye:edge
    
  2. Verify version
    Confirm the running version inside logs:

    docker logs motioneye | grep "motionEye server"
    

    Result:

    motionEye server 0.43.1b4
    

    <img width="741" height="168" alt="version_ver" src="https://github.com/user-attachments/assets/ac85d238-da7f-4274-9381-0119c01a1320" />

  3. Container shell access (for verification later)
    Keep a shell handy to verify results:

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

Exploitation Steps

  1. Access Web Interface

    • Open browser at: http://127.0.0.1:9999
    • Login with default credentials: admin / (blank password)
    • Add a sample RTSP network camera (required to enable camera-specific settings).

    <img width="1623" height="869" alt="add_camera" src="https://github.com/user-attachments/assets/d506a891-8b80-4b69-84f2-b195fcaca0cc" />

  2. Attempt malicious filename input

    • Go to: Camera Settings → Still Images
    • In the Image File Name field, try:
      $(touch /tmp/test).%Y-%m-%d-%H-%M-%S
      
    • Observation: This is blocked by client-side validation in the browser.

    <img width="739" height="104" alt="er1" src="https://github.com/user-attachments/assets/817549fc-5cb2-4959-b29d-5cec745e096b" />

    <img width="611" height="90" alt="er2" src="https://github.com/user-attachments/assets/a68eec73-bade-4cc5-b65b-4fc2dfbc7f01" />

  3. Client-Side Validation Discovery

    • The check is implemented in JavaScript:
      • /static/js/main.js?v=0.43.1b4 → references /static/js/ui.js?v=0.43.1b4
    • Example validation function:
      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;
      }
      
  4. Bypass Validation

    • Open browser console (F12 → Console tab)
    • Override the function to always return true:
      configUiValid = function() { return true; };
      
    • This bypasses client-side validation and allows arbitrary values. …
Record
GHSA-j945-qm58-4gjx
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78, CWE-116
Updated
2026-11-02
NVD 7.2

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Record
CVE-2025-60787
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20, CWE-78, CWE-116
Updated
2026-11-06
OSV 7.2

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Record
CVE-2025-60787
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-07
OSVGHSA-26f6-wm47-7h7j 7.2

Duplicate Advisory: motionEye vulnerable to RCE via unsanitized motion config parameter

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-j945-qm58-4gjx. This link is maintained to preserve external references.

Original Description

MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.

Record
GHSA-26f6-wm47-7h7j
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
OSVGHSA-j945-qm58-4gjx 7.2

motionEye vulnerable to RCE via unsanitized motion config parameter

Summary

A command injection vulnerability in MotionEye allows attackers to achieve Remote Code Execution (RCE) by supplying malicious values in configuration fields exposed via the Web UI. Because MotionEye writes user-supplied values directly into Motion configuration files without sanitization, attackers can inject shell syntax that is executed when the Motion process restarts. This issue enables full takeover of the MotionEye container and potentially the host environment (depending on container privileges).

Details

Root Cause:

MotionEye accepts arbitrary strings from fields such as image_file_name and movie_filename in the Web UI. These are written directly into /etc/motioneye/camera-*.conf. When MotionEye restarts the Motion service (motionctl.start), the Motion binary reads this configuration. Because Motion treats these fields as shell-expandable, injected characters (e.g. $(), backticks) are interpreted as shell commands.

Vulnerability flow:

Dashboard (Web UI) ↓ ConfigHandler.set_config() ↓ camera-*.conf written ↓ motionctl.restart() ↓ Motion parses config → executes payload

Affected code:

The issue arises in how config.py handles user input before writing to config files. No sanitization or allowlisting is applied to filename fields.

Proof of Concept (PoC)

The following steps reproduce the Remote Code Execution (RCE) vulnerability in MotionEye.
Tested using the official Docker image.


Environment Setup

  1. Start MotionEye container
    Launch the vulnerable container:

    docker run -d --name motioneye -p 9999:8765 ghcr.io/motioneye-project/motioneye:edge
    
  2. Verify version
    Confirm the running version inside logs:

    docker logs motioneye | grep "motionEye server"
    

    Result:

    motionEye server 0.43.1b4
    

    <img width="741" height="168" alt="version_ver" src="https://github.com/user-attachments/assets/ac85d238-da7f-4274-9381-0119c01a1320" />

  3. Container shell access (for verification later)
    Keep a shell handy to verify results:

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

Exploitation Steps

  1. Access Web Interface

    • Open browser at: http://127.0.0.1:9999
    • Login with default credentials: admin / (blank password)
    • Add a sample RTSP network camera (required to enable camera-specific settings).

    <img width="1623" height="869" alt="add_camera" src="https://github.com/user-attachments/assets/d506a891-8b80-4b69-84f2-b195fcaca0cc" />

  2. Attempt malicious filename input

    • Go to: Camera Settings → Still Images
    • In the Image File Name field, try:
      $(touch /tmp/test).%Y-%m-%d-%H-%M-%S
      
    • Observation: This is blocked by client-side validation in the browser.

    <img width="739" height="104" alt="er1" src="https://github.com/user-attachments/assets/817549fc-5cb2-4959-b29d-5cec745e096b" />

    <img width="611" height="90" alt="er2" src="https://github.com/user-attachments/assets/a68eec73-bade-4cc5-b65b-4fc2dfbc7f01" />

  3. Client-Side Validation Discovery

    • The check is implemented in JavaScript:
      • /static/js/main.js?v=0.43.1b4 → references /static/js/ui.js?v=0.43.1b4
    • Example validation function:
      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;
      }
      
  4. Bypass Validation

    • Open browser console (F12 → Console tab)
    • Override the function to always return true:
      configUiValid = function() { return true; };
      
    • This bypasses client-side validation and allows arbitrary values. …
Record
GHSA-j945-qm58-4gjx
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-116, CWE-78
Updated
2026-11-02
OSVPYSEC-2026-1680 7.2

motionEye vulnerable to RCE via unsanitized motion config parameter

Summary

A command injection vulnerability in MotionEye allows attackers to achieve Remote Code Execution (RCE) by supplying malicious values in configuration fields exposed via the Web UI. Because MotionEye writes user-supplied values directly into Motion configuration files without sanitization, attackers can inject shell syntax that is executed when the Motion process restarts. This issue enables full takeover of the MotionEye container and potentially the host environment (depending on container privileges).

Details

Root Cause:

MotionEye accepts arbitrary strings from fields such as image_file_name and movie_filename in the Web UI. These are written directly into /etc/motioneye/camera-*.conf. When MotionEye restarts the Motion service (motionctl.start), the Motion binary reads this configuration. Because Motion treats these fields as shell-expandable, injected characters (e.g. $(), backticks) are interpreted as shell commands.

Vulnerability flow:

Dashboard (Web UI) ↓ ConfigHandler.set_config() ↓ camera-*.conf written ↓ motionctl.restart() ↓ Motion parses config → executes payload

Affected code:

The issue arises in how config.py handles user input before writing to config files. No sanitization or allowlisting is applied to filename fields.

Proof of Concept (PoC)

The following steps reproduce the Remote Code Execution (RCE) vulnerability in MotionEye.
Tested using the official Docker image.


Environment Setup

  1. Start MotionEye container
    Launch the vulnerable container:

    docker run -d --name motioneye -p 9999:8765 ghcr.io/motioneye-project/motioneye:edge
    
  2. Verify version
    Confirm the running version inside logs:

    docker logs motioneye | grep "motionEye server"
    

    Result:

    motionEye server 0.43.1b4
    

    <img width="741" height="168" alt="version_ver" src="https://github.com/user-attachments/assets/ac85d238-da7f-4274-9381-0119c01a1320" />

  3. Container shell access (for verification later)
    Keep a shell handy to verify results:

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

Exploitation Steps

  1. Access Web Interface

    • Open browser at: http://127.0.0.1:9999
    • Login with default credentials: admin / (blank password)
    • Add a sample RTSP network camera (required to enable camera-specific settings).

    <img width="1623" height="869" alt="add_camera" src="https://github.com/user-attachments/assets/d506a891-8b80-4b69-84f2-b195fcaca0cc" />

  2. Attempt malicious filename input

    • Go to: Camera Settings → Still Images
    • In the Image File Name field, try:
      $(touch /tmp/test).%Y-%m-%d-%H-%M-%S
      
    • Observation: This is blocked by client-side validation in the browser.

    <img width="739" height="104" alt="er1" src="https://github.com/user-attachments/assets/817549fc-5cb2-4959-b29d-5cec745e096b" />

    <img width="611" height="90" alt="er2" src="https://github.com/user-attachments/assets/a68eec73-bade-4cc5-b65b-4fc2dfbc7f01" />

  3. Client-Side Validation Discovery

    • The check is implemented in JavaScript:
      • /static/js/main.js?v=0.43.1b4 → references /static/js/ui.js?v=0.43.1b4
    • Example validation function:
      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;
      }
      
  4. Bypass Validation

    • Open browser console (F12 → Console tab)
    • Override the function to always return true:
      configUiValid = function() { return true; };
      
    • This bypasses client-side validation and allows arbitrary values. …
Record
PYSEC-2026-1680
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
motioneye
PyPI
before 0.43.1b5
0.43.1b5
motioneye
PyPI
before 0.43.1b5, plus listed versions
0.270.27.10.27.20.280.28.1
Show 45 moreShow less
0.28.20.28.30.290.29.10.29rc10.29rc20.300.30rc10.30rc20.310.31.10.31.20.31.30.31.40.31.50.320.32.10.32.20.330.33.10.33.20.33.30.33.40.340.34.10.34rc10.350.35.10.35.20.35rc10.360.36.10.370.37.10.37rc10.380.38.10.390.39.10.39.20.39.30.400.40rc10.40rc20.40rc3
0.43.1b5

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
MetasploitRemote Code Execution Vulnerability in MotionEye Frontend (CVE-2025-60787)2025-09-09
PoC in GitHubprabhatverma47/CVE-2025-607872025-10-03
Exploit-DBmotionEye 0.43.1b4 - RCE2026-02-11
PoC in GitHubGarethMSheldon/CVE-2025-60787-Detection-motionEye-RCE-via-Config-Injection2026-02-28
PoC in GitHubRohitberiwala/CVE-2025-60787-MotionEye-RCE2026-03-07
PoC in GitHubgunzf0x/CVE-2025-607872026-03-08
PoC in GitHublil0xplorer/CVE-2025-60787_PoC2026-03-08
PoC in GitHubd3vn0mi/CVE-2025-60787-POC2026-03-13
PoC in GitHubagent-skywalker/CVE-2025-607872026-03-14
PoC in GitHubozcanpng/CVE-2025-607872026-07-10
PoC in GitHubdiamorphine666/CVE-2025-607872026-10-03

History

History
RecordedChangedSources
exploits, factsNVD
affected
first indexedCVE List, EUVD, Exploit-DB, GitHub Advisories, Metasploit, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-60787 is a high vulnerability (CVSS 7.2) in Motioneye Project Motioneye, published October 3, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 18.5%, the 97th percentile. Fixed in motioneye 0.43.1b5.

References

This page doesn't list everything

Left out here: 10 versions and the rest of 3 source descriptions. The JSON record has them.

MoveEnter Open