ZeroHour

CVE-2025-58180

large

Authenticated OS Command Injection in OctoPrint via Crafted Upload Filenames

CVSS 4.0
7.5 high
EPSS
21%p97
Published
()
Modified
AI analysis

OctoPrint versions up to and including 1.11.2 contain an OS command injection flaw (CWE-78) in the handling of uploaded file names. An authenticated attacker can upload a file under a specially crafted filename; if that filename is inserted as a parameter into a system command by a configured system event handler and the event fires, arbitrary commands execute on the host running OctoPrint, yielding high impact on confidentiality, integrity and availability per the CVSS 4.0 score of 7.5. Instances that have no event handlers configured to run system commands with filename-based placeholders are not impacted by this flaw at all. All OctoPrint deployments on 1.11.2 or earlier are technically affected, but real-world exploitability depends entirely on local event-handler configuration and on who has authenticated access to the instance. No public proof-of-concept or confirmed in-the-wild exploitation is known and the flaw is not in CISA's KEV catalog, although EPSS assigns a 20.6% probability of exploitation within 30 days (97th percentile).

What to do: Upgrade to OctoPrint 1.11.3. If upgrading is not immediately possible, disable any system event handlers that use filename-based placeholders (set their 'enabled' property to False or uncheck 'Enabled' in the Event Manager GUI), or set feature.enforceReallyUniversalFilenames to true in config.yaml and restart OctoPrint, then vet existing uploads and delete any suspicious files. Regardless, do not expose OctoPrint to hostile networks such as the public internet and restrict instance access to trusted users.

Affected
OctoPrintall versions up to and including 1.11.2; fixed in 1.11.3
Estimated exposure
large≈100,000+ active OctoPrint instances worldwide (tens of thousands directly internet-exposed per public scans), of which only a subset with filename-based… — OctoPrint is the dominant web control interface for consumer 3D printers, bundled with OctoPi and preinstalled on multiple printer products, and public internet scans enumerate tens of thousands of exposed instances, implying an overall…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

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.

Vendors
octoprint
Products
octoprint
Weakness
CWE-78
Vector
CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.