# CVE-2026-31978: motionEye path traversal in picture and movie API endpoints

Source: https://junglewise.ai/threats/cve-2026-31978-motioneye-path-traversal-in-picture-and-movie-api-endpoints  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-24. Updated: 2026-06-24  
License: CC BY 4.0 with a link back

CVE-2026-31978 · Severity: medium · CVSS 6.5 · Published 2026-06-24

motionEye is a web-based interface used to manage video surveillance and motion detection cameras. A security flaw allows users with standard access to bypass folder restrictions and view any file on the underlying server. This could lead to the theft of sensitive information, including system passwords, configuration files, and private surveillance footage from other cameras.

Technologies: [motioneye (PyPI)](https://junglewise.ai/threats/technologies/motioneye). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-31978 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-31978 being exploited in the wild.

**How severe is CVE-2026-31978?** Medium severity, with a CVSS score of 6.5, published 24 June 2026.

**Which products and versions are affected?** motioneye (PyPI) < 0.44.0, ECOSYSTEM:introduced=0,fixed=0.44.0.

**Is there a fix for CVE-2026-31978?** Yes. motioneye (PyPI): upgrade to 0.44.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-31978 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-31978?** Check whether you run motioneye (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- motioneye (PyPI): upgrade to 0.44.0 or later

  ```sh
  pip install "motioneye>=0.44.0"
  ```


## Technical details

A path traversal vulnerability exists in the picture and movie API endpoints (e.g., /picture/{id}/preview/{filename}) of motionEye. The root cause is a failure to sanitize the 'filename' parameter for '..' sequences within the mediafiles.py functions, specifically get_media_preview() and del_media_content(). While other functions like get_media_content() implemented checks, these specific handlers remained vulnerable. An authenticated attacker with normal (non-admin) privileges can provide URL-encoded traversal sequences (%2F) to escape the intended media directory. This allows for the retrieval of sensitive system files such as /etc/passwd, /etc/shadow, and motionEye configuration files containing credentials. The issue is resolved in version 0.44.0.

## Affected products

- motioneye-project motionEye < 0.44.0

## Identifiers

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

## Timeline

- 2026-06-20: patched: Version 0.44.0 released
- 2026-06-20: advisory: GitHub Security Advisory GHSA-g9fx-5r4h-pcw3 published
- 2026-06-24: disclosed: CVE-2026-31978 published to NVD

## References

- [https://github.com/motioneye-project/motioneye/releases/tag/0.44.0](https://github.com/motioneye-project/motioneye/releases/tag/0.44.0)
- [https://github.com/motioneye-project/motioneye/security/advisories/GHSA-g9fx-5r4h-pcw3](https://github.com/motioneye-project/motioneye/security/advisories/GHSA-g9fx-5r4h-pcw3)

## Related threats

- [motionEye missing authentication in ActionHandler](https://junglewise.ai/threats/cve-2026-55863-motioneye-missing-authentication-in-actionhandler)
- [motionEye authentication bypass via password hash in cookies](https://junglewise.ai/threats/cve-2026-46488-motioneye-authentication-bypass-via-password-hash-in-cookies)
- [PYSEC-2026-681 - Unrestricted Upload of File with Dangerous Type in motionEye](https://junglewise.ai/threats/cve-2021-44255-unrestricted-upload-of-file-with-dangerous-type-in-motioneye)
- [motionEye insecure file permissions in motion.conf](https://junglewise.ai/threats/cve-2026-32315-motioneye-insecure-file-permissions-in-motion-conf)
- [motionEye path traversal in media file handlers](https://junglewise.ai/threats/cve-2026-55488-motioneye-path-traversal-in-media-file-handlers)
