Skip to content
Noroxi
OSV ecosystem advisory

GHSA-qxvg-h7q2-hcxh: motionEye: LFI → pass‑the‑hash admin → unsafe restore → unauth action exec (RCE)

CriticalCVSS 9.8 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 39/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: motioneye (PyPI) 0.44.0.

Low priority for now. Upgrade to motioneye (PyPI) 0.44.0 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: OSV

## Summary A multi‑stage chain in motionEye leads to remote code execution. The chain combines: 1. **Arbitrary file read (LFI)** via the picture download endpoint for **local motion cameras** using absolute paths. 2. **Pass‑the‑hash admin auth** due to accepting request signatures computed with password hashes. 3. **Unsafe config restore** that extracts attacker‑controlled tarballs into `CONF_PATH`. 4. **Unauthenticated action execution** via `/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**. --- ## Affected Code (motionEye repo) ### 1) LFI (absolute path) — `picture/<id>/download` **Files:** - `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. ### 2) Pass‑the‑hash admin auth **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. ### 3) Unsafe restore (tar extraction) **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`. ### 4) Unauthenticated action execution **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`. --- ## Exploit Chain (Detailed) 1. **Create or find a local motion camera id** (local motion cameras are required for the vulnerable LFI path). 2. **LFI via picture download**: - Request: `/picture/<id>/download/<absolute_path>` - Example: `/picture/1/download/%2Fetc%2Fhosts` - Result: Arbitrary file read. 3. **Read admin hash** from `/etc/motioneye/motion.conf`: - Contains `@admin_password <SHA1_HASH>`. 4. **Pass‑the‑hash admin**: - Compute signature for `/config/restore?_username=admin` using the **hash** as key. - Admin access is accepted with hash‑based signatures. 5. **Restore malicious tar**: - Upload a tar containing `lock_<id>` (or any action) as an executable. - File is written into `CONF_PATH` by restore. 6. **Trigger unauth action**: - POST `/action/<id>/lock` - The server executes the injected file. --- ## Proof of Execution (Observed Output) In 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 ``` --- ## Preconditions / Requirements - At least **one local motion camera** exists (e.g., `netcam_url`, `videodevice`). - `picture/<id>/download` is reachable: - **Unauth** if `@normal_password` is empty (default in some installs). - **Auth required** if normal password is set (attacker needs normal creds). --- ## Impact - **Unauth RCE** (normal password unset). - **Authenticated RCE** (normal user → admin → RCE). - Arbitrary file read on server filesystem. - Full compromise of motionEye process account. --- ## Suggested Fixes 1. **Block absolute paths** in `get_media_content()` and `get_media_path()`. 2. **Remove hash‑based signature acceptance**; only accept signatures computed with plaintext passwords. 3. **Harden restore**: reject absolute paths, `..`, symlinks, non‑regular files. 4. **Require authentication** on `ActionHandler` (admin‑only).

Published
Jun 23, 2026
Updated
Jun 23, 2026
EPSS
—

Report tools

JSON

Action score

39

Monitor

Low priority for now.

CVSS
39 / 40 · 9.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · —

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow GHSA-qxvg-h7q2-hcxh

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
PyPImotioneye

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
PyPImotioneyebefore 0.44.00.44.0

Same product

PyPI: all records

Other highest-scoring records for the same primary product.

  • GHSA-phv5-334h-mxcwmotionEye Partial Authentication Bypass: Unauthenticated Admin Credential Theft via Path Traversal
    0Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
PyPI:motioneye0.44.0Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

osv

Root cause

A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const file = path.join(ROOT, req.query.name);res.sendFile(file);

Fixed

ts
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) {  return res.sendStatus(400);}res.sendFile(file);

References

Show all references (1 more)

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records