CVE-2025-58180
HIGHOctoPrint <= 1.11.2 - Authenticated OS Command Injection via Crafted Filename in Event Handler
Title source: llmExploitation Summary
EIP tracks 2 public exploits for CVE-2025-58180. PoCs published by prabhat, prabhatverma47.
AI-analyzed exploit summary This exploit demonstrates a command injection vulnerability in OctoPrint <= 1.11.2, where an authenticated attacker can upload a file with a crafted filename containing shell metacharacters. When processed by a configured system event handler, this results in arbitrary command execution on the host.
Description
OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.11.2 contain a vulnerability that allows an authenticated attacker to upload a file under a specially crafted filename that will allow arbitrary command execution if said filename becomes included in a command defined in a system event handler and said event gets triggered. If no event handlers executing system commands with uploaded filenames as parameters have been configured, this vulnerability does not have an impact. The vulnerability is patched in version 1.11.3. As a workaround, OctoPrint administrators who have event handlers configured that include any kind of filename based placeholders should disable those by setting their `enabled` property to `False` or unchecking the "Enabled" checkbox in the GUI based Event Manager. Alternatively, OctoPrint administrators should set `feature.enforceReallyUniversalFilenames` to `true` in `config.yaml` and restart OctoPrint, then vet the existing uploads and make sure to delete any suspicious looking files. As always, OctoPrint administrators are advised to not expose OctoPrint on hostile networks like the public internet, and to vet who has access to their instance.
Exploits (2)
This exploit demonstrates a command injection vulnerability in OctoPrint <= 1.11.2, where an authenticated attacker can upload a file with a crafted filename containing shell metacharacters. When processed by a configured system event handler, this results in arbitrary command execution on the host.
This PoC demonstrates a remote code execution (RCE) vulnerability in OctoPrint <=1.11.2 by exploiting unsanitized filenames in file uploads, which are later executed via the event system. The attack leverages shell metacharacters in the filename to inject commands.
References (4)
Scores
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H