Skip to content

← Actionable
Medium, CVSS 6.5amended

motionEye has an Arbitrary File Read via Path Traversal in Picture/Movie Preview Endpoint

CVE-2026-31978GHSA-g9fx-5r4h-pcw3

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (motioneye 0.44.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.5 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS
  • CVE-2026-31978: 0.34% estimated exploitation activity in the next 30 days; percentile 27.02 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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 getmediapreview() check for .. sequences in the filename parameter, except getmediacontent() 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 getmediacontent() function properly validates the path: But getmediapreview() does NOT: Similarly, delmediacontent() 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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-g9fx-5r4h-pcw3

  2. Revision 1 · created ·

    Published from osv record GHSA-g9fx-5r4h-pcw3

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-31978

Advisory: motionEye has an Arbitrary File Read via Path Traversal in Picture/Movie Preview Endpoint
IDs: CVE-2026-31978, GHSA-g9fx-5r4h-pcw3
Record: https://patchnext.com/advisories/cve-2026-31978 (revision 2, source checked 26 Oct 2026, 13:46 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: motioneye 0.44.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI motioneye: affected < 0.44.0; fixed in 0.44.0

## Suggested inspection (read-only)
- `python -m pip show motioneye`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on motioneye.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-g9fx-5r4h-pcw3 (OSV record GHSA-g9fx-5r4h-pcw3 lists affected ranges: PyPI motioneye >=0 <0.44.0 (fixed))
- Verified: https://github.com/advisories/GHSA-g9fx-5r4h-pcw3 (GitHub-reviewed advisory GHSA-g9fx-5r4h-pcw3 lists affected ranges: PyPI motioneye >=0 <0.44.0)

Commands are suggestions: review each one before running it.

Loading voting…