CVE-2025-60787
MotionEye v0.43.1b4 and before is vulnerable to OS Command Injection in configuration parameters such as image_file_name. Unsanitized user input is written to Motion configuration files, allowing remote authenticated attackers with admin access to achieve code execution when Motion is restarted.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
Mitigation
Upgrade motioneye to 0.43.1b5 or later.
Timeline
Days relative to CVE publicationFirst public PoC 6.7 days after publication; not in CISA KEV. First PoC: Metasploit exploit: Remote Code Execution Vulnerability in MotionEye Frontend (CVE-2025-60787) (exploit/linux/http/motioneye_auth_rce_cve_2025_60787) (Metasploit, 9 Oct 2025).
PoC repositories
Found on GitHub.7 PoCs · 2 informational
PoCs 7
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Rohitberiwala/CVE-2025-60787-MotionEye-RCE | 7 Mar 2026 +155 d | 1 | PoC |
| gunzf0x/CVE-2025-60787 | 8 Mar 2026 +156 d | 10 | PoC |
| lil0xplorer/CVE-2025-60787_PoC | 8 Mar 2026 +156 d | 2 | PoC |
| d3vn0mi/CVE-2025-60787-POC | 13 Mar 2026 +162 d | 0 | PoC |
| agent-skywalker/CVE-2025-60787 | 14 Mar 2026 +162 d | 0 | PoC |
| ozcanpng/CVE-2025-60787 | 10 Jul 2026 +281 d | 0 | PoC |
| diamorphine666/CVE-2025-60787 | 3 Oct 2026 +1.0 y | 0 | PoC |
Informational 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| prabhatverma47/CVE-2025-60787 | 3 Oct 2025 +15 h | 0 | Informational · write-up |
| GarethMSheldon/CVE-2025-60787-Detection-motionEye-RCE-via-Config-Injection | 28 Feb 2026 +149 d | 0 | Informational · detection |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Exploit-DB | motionEye 0.43.1b4 - RCE | 11 Feb 2026 | 14 Nov 2026 |
| Metasploit | Metasploit exploit: Remote Code Execution Vulnerability in MotionEye Frontend (CVE-2025-60787) (exploit/linux/http/motioneye_auth_rce_cve_2025_60787) | 9 Oct 2025 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 7 PoC reposGET /static{var}
GET /{var}/action/snapshot
- Ports
- 4444, 7999, 8765
- Seen in
- 1 repo: agent-skywalker/CVE-2025-60787
- Evidence
- agent-skywalker/CVE-2025-60787/CVE-2025-60787.py:218
POST /config/1/set
- Body markers
picture_filename=$(inapplication/x-www-form-urlencoded- Seen in
- 1 repo: Rohitberiwala/CVE-2025-60787-MotionEye-RCE
- Evidence
- Rohitberiwala/CVE-2025-60787-MotionEye-RCE/exploit.py:111 Rohitberiwala/CVE-2025-60787-MotionEye-RCE/exploit.py:149
POST /login
- Body markers
username=password=inapplication/x-www-form-urlencoded- Seen in
- 1 repo: Rohitberiwala/CVE-2025-60787-MotionEye-RCE
- Evidence
- Rohitberiwala/CVE-2025-60787-MotionEye-RCE/exploit.py:81
POST /{var}/action/snapshot
- Key headers
Accept: */*Accept-Language: en-US,en;q=0.9Origin: http://127.0.0.1:8765" # Full URL to the motionEye web interfaceReferer: {var}/X-Requested-With: XMLHttpRequest- Content-Type
application/json- Ports
- 4444, 7999, 8765
- PoC User-Agent
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36- Seen in
- 1 repo: agent-skywalker/CVE-2025-60787
- Evidence
- agent-skywalker/CVE-2025-60787/CVE-2025-60787.py:203
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/static[^/?#]*(?:[?#].*)?$
(?i)^/[^/?#]*/action/snapshot(?:[?#].*)?$
(?i)^/config/1/set(?:[?#].*)?$
(?i)^/login(?:[?#].*)?$
(?i)^/[^/?#]*/action/snapshot(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2025-60787 CVE-2025-60787 exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/static"; reference:url,poc.griffinguard.io/cve/CVE-2025-60787; classtype:web-application-attack; sid:9284710; rev:1;)
alert http any any -> $HOME_NET [4444,7999,8765] (msg:"GG PoC-Monitor CVE-2025-60787 CVE-2025-60787 exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/action/snapshot"; reference:url,poc.griffinguard.io/cve/CVE-2025-60787; classtype:web-application-attack; sid:9298948; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2025-60787 CVE-2025-60787 exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/config/1/set"; http.request_body; content:"picture_filename=$("; reference:url,poc.griffinguard.io/cve/CVE-2025-60787; classtype:web-application-attack; sid:9805120; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2025-60787 CVE-2025-60787 exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/login"; http.request_body; content:"username="; http.request_body; content:"password="; reference:url,poc.griffinguard.io/cve/CVE-2025-60787; classtype:web-application-attack; sid:9861030; rev:1;)
alert http any any -> $HOME_NET [4444,7999,8765] (msg:"GG PoC-Monitor CVE-2025-60787 CVE-2025-60787 exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/action/snapshot"; http.header; content:"Accept: */*"; nocase; http.header; content:"Accept-Language: en-US,en|3b|q=0.9"; nocase; http.header; content:"Origin: http://127.0.0.1:8765|22| # Full URL to the motionEye web interface"; nocase; http.header_names; content:"Referer"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2025-60787; classtype:web-application-attack; sid:9156218; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: CVE-2025-60787 exploit attempt (CVE-2025-60787)
id: gg-pocmon-cve-2025-60787-9284710
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-60787. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-60787
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/static'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.60787
title: CVE-2025-60787 exploit attempt (CVE-2025-60787)
id: gg-pocmon-cve-2025-60787-9298948
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-60787. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-60787
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/action/snapshot'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.60787
title: CVE-2025-60787 exploit attempt (CVE-2025-60787)
id: gg-pocmon-cve-2025-60787-9805120
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-60787. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-60787
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/config/1/set'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.60787
title: CVE-2025-60787 exploit attempt (CVE-2025-60787)
id: gg-pocmon-cve-2025-60787-9861030
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-60787. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-60787
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/login'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.60787
title: CVE-2025-60787 exploit attempt (CVE-2025-60787)
id: gg-pocmon-cve-2025-60787-9156218
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-60787. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-60787
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/action/snapshot'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.60787