GHSA-rw9q-97r9-8gvh
GHSA-rw9q-97r9-8gvh is a Path Traversal vulnerability in motioneye. O3 Security confirms whether GHSA-rw9q-97r9-8gvh is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
motionEye's Absolute Path Traversal in Media File Handlers Allows Arbitrary File Read
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-rw9q-97r9-8gvh.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
motioneyeReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Summary
mEye contains an absolute path traversal vulnerability in multiple media file handlers that allows an attacker to read arbitrary files from the filesystem.
The affected handlers accept a user-controlled filename parameter and construct filesystem paths using os.path.join(). When an absolute path is supplied, Python discards the configured media directory and returns the attacker-supplied path directly. The application then bypasses Tornado's built-in path validation by overriding the relevant safety checks.
As a result, an attacker can access files outside of the configured camera media directory, subject to the permissions of the motionEye process.
Details
The issue exists in the media playback and download functionality.
The filename parameter is passed to mediafiles.get_media_path():
def get_media_path(camera_config, path, media_type):
target_dir = camera_config.get('target_dir')
full_path = os.path.join(target_dir, path)
return full_path
When path is an absolute path (e.g. /etc/motioneye/motion.conf), Python's os.path.join() discards target_dir entirely and returns the absolute path as-is. This would normally be caught by Tornado's StaticFileHandler path validation, but MoviePlaybackHandler explicitly overrides both safety checks (movie_playback.py lines 111-115):
def get_absolute_path(self, root, path):
return path
def validate_absolute_path(self, root, absolute_path):
return absolute_path
This allows reading any file on the filesystem that the motionEye process can access.
The same path traversal exists in the movie download, picture download, and picture preview handlers:
- GET /movie/<camera_id>/download/<filename>
- GET /picture/<camera_id>/download/<filename>
- GET /picture/<camera_id>/preview/<filename>
PoC
GET /movie/1/playback//etc/motioneye/motion.conf HTTP/1.1
Host: target:8765
Fix
Do not allow absolute paths supplied by user input.
Validate that the fully resolved canonical path remains within the configured camera media directory before serving a file.
Additionally, Tornado’s built-in path validation should not be bypassed unless equivalent validation is performed by motionEye.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | motioneye | all versions | 0.44.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for motioneye. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update motioneye to 0.44.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-rw9q-97r9-8gvh is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-rw9q-97r9-8gvh is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-rw9q-97r9-8gvh. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-rw9q-97r9-8gvh in your dependencies?
O3 detects GHSA-rw9q-97r9-8gvh across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.