MotionEye OS Command Injection Vulnerability Allowing Remote Code Execution

Vulnerability

A command injection vulnerability has been identified in MotionEye versions through 0.43.1b4. The issue arises from unsanitized user input in configuration parameters, such as 'image_file_name', which is written to Motion configuration files. This vulnerability allows remote authenticated attackers with admin access to execute arbitrary code when Motion is restarted.

Impact

Exploitation of this vulnerability leads to remote code execution on the server where MotionEye is running.

Reproduction

The vulnerability can be reproduced by uploading a payload containing shell commands into the 'Image File Name' configuration parameter. After applying the settings, the payload is executed when the Motion service is restarted.

Remediation

Users can manually sanitize the 'image_file_name' parameter to remove any potentially harmful characters before uploading it. Additionally, a patch is available that modifies the MotionEye configuration file to include proper input sanitization.

Added: Oct 3, 2025, 4:18 PM
Updated: Oct 3, 2025, 4:18 PM

Vulnerability Rating

Custom Algorithm
spread
5.7
impact
10.0
exploitability
5.8
remediation
8.3
relevance
0.6
threat
7.6
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.