CVE-2025-58180
JSON

7.5high

OctoPrint is Vulnerable to RCE Attacks via Unsanitized Filename in File Upload

Severity
7.5high CVSS:4.0 by GitHub_M
Exploit likelihood
28.0% (higher than 98% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-49mj-x8jp-qvfcPYSEC-2026-1712

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.

Affected

Product or packageVersionsReported by
OctoPrint OctoPrint< 1.11.3, before 1.11.3CVE List, NVD
octoprint (PyPI)before 1.11.3GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M7.5high CVSS:4.0CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Classification

CWE-78

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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.

Patches

The vulnerability will be patched in version 1.11.3.

Workaround

Until the patch has been applied, OctoPrint administrators who have event handlers configured that include any kind of filename based placeholders (i.e. {__filename}, {__filepath}, {filename}, {path}, etc -- refer to the events documentation for a full list) 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 (e.g. those that contain a ; in their name followed by a command).

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.

Credits

This vulnerability was discovered and responsibly disclosed to OctoPrint by @prabhatverma47.

NVD (es)

OctoPrint proporciona una interfaz web para controlar impresoras 3D de consumo. Las versiones de OctoPrint hasta la 1.11.2 inclusive contienen una vulnerabilidad que permite a un atacante autenticado subir un archivo con un nombre de archivo especialmente diseñado que permitirá la ejecución arbitraria de comandos si dicho nombre de archivo se incluye en un comando definido en un gestor de eventos del sistema y dicho evento se activa. Si no se han configurado gestores de eventos que ejecuten comandos del sistema con nombres de archivo subidos como parámetros, esta vulnerabilidad no tiene un impacto. La vulnerabilidad está parcheada en la versión 1.11.3. Como solución alternativa, los administradores de OctoPrint que tienen gestores de eventos configurados que incluyen cualquier tipo de marcadores de posición basados en nombres de archivo deberían deshabilitarlos configurando su propiedad 'enabled' a 'False' o desmarcando la casilla de verificación 'Enabled' en el Gestor de Eventos basado en GUI. Alternativamente, los administradores de OctoPrint deberían establecer 'feature.enforceReallyUniversalFilenames' a 'true' en 'config.yaml' y reiniciar OctoPrint, luego examinar las cargas existentes y asegurarse de eliminar cualquier archivo de aspecto sospechoso. Como siempre, se aconseja a los administradores de OctoPrint que no expongan OctoPrint en redes hostiles como la internet pública, y que examinen quién tiene acceso a su instancia.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-58180 changed 2025-09-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-49mj-x8jp-qvfc changed 2026-07-07CC-BY-4.0
NVDCVE-2025-58180 changed 2026-10-19Public domain
PyPA Advisory DatabasePYSEC-2026-1712 changed 2026-07-07CC-BY-4.0