GHSA-qxvg-h7q2-hcxhCritical· 9.8▾ MidnightmotionEye: LFI → pass‑the‑hash admin → unsafe restore → unauth action exec (RCE)
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 53.9 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
A multi‑stage chain in motionEye leads to remote code execution. The chain combines:
CONF_PATH./action/<id>/<action>.If the normal user password is unset, the chain becomes unauthenticated RCE. If a normal password exists, a normal user can still achieve admin escalation and RCE.
picture/<id>/downloadFiles:
motioneye/motioneye/handlers/picture.py → download() (local motion camera branch)motioneye/motioneye/mediafiles.py → get_media_content()Issue: get_media_content() only blocks .. and then joins target_dir with path. Absolute paths (e.g. /etc/hosts) bypass the join and are read directly.
File: motioneye/motioneye/handlers/base.py → get_current_user()
Issue: The signature check allows signatures computed using the admin password hash (SHA1) as the key. If the hash is leaked (via LFI), admin access can be obtained without the plaintext password.
File: motioneye/motioneye/config.py → restore()
Issue: tar zxC CONF_PATH is used on user‑supplied data without sanitizing entries. A crafted tar can drop executable files into CONF_PATH.
File: motioneye/motioneye/handlers/action.py → post()
Issue: No authentication decorator is present. It executes <action>_<camera_id> found in CONF_PATH with subprocess.Popen.
/picture/<id>/download/<absolute_path>/picture/1/download/%2Fetc%2Fhosts/etc/motioneye/motion.conf:
@admin_password <SHA1_HASH>./config/restore?_username=admin using the hash as key.lock_<id> (or any action) as an executable.CONF_PATH by restore./action/<id>/lockIn local testing, the injected action created a marker file:
/tmp/meye_rce_ok
Verification command:
docker exec -it motioneye ls -la /tmp | grep meye_rce_ok
Example output:
-rw-r--r-- 1 root root 0 ... /tmp/meye_rce_ok
netcam_url, videodevice).picture/<id>/download is reachable:
@normal_password is empty (default in some installs).get_media_content() and get_media_path()..., symlinks, non‑regular files.ActionHandler (admin‑only).motioneye < 0.44.0Upgrade to a patched release:
motioneye 0.44.0Connected by shared product, vendor, weakness, or advisory.
CVE-2024-13986High· 8.8Nagios XI < 2024R1.3.2 contains a remote code execution vulnerability by chaining two flaws: an arbitrary file upload and a path traversal in the Core Config Snapshots interface
CVE-2026-31978Medium· 6.5motionEye has an Arbitrary File Read via Path Traversal in Picture/Movie Preview Endpoint
CVE-2026-55488HighmotionEye's Absolute Path Traversal in Media File Handlers Allows Arbitrary File Read
CVE-2025-47782HighmotionEye vulnerable to RCE in add_camera Function Due to unsafe command execution
CVE-2021-44255High· 7.2Unrestricted Upload of File with Dangerous Type in motionEye
CVE-2025-60787High· 7.2motionEye vulnerable to RCE via unsanitized motion config parameter