Command Injection Affecting octoprint package, versions [,1.11.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.13% (34th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-OCTOPRINT-12670480
  • published14 Sept 2025
  • disclosed9 Sept 2025
  • creditprabhatverma47

Introduced: 9 Sep 2025

NewCVE-2025-58180  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade OctoPrint to version 1.11.3 or higher.

Overview

OctoPrint is a snappy web interface for your 3D printer

Affected versions of this package are vulnerable to Command Injection due to upload file when a specially crafted filename is included in a command defined in a system event handler and the corresponding event is triggered. An attacker can execute arbitrary system commands by uploading a file with a malicious filename if event handlers are configured to use uploaded filenames as command parameters.

Note: This is only exploitable if event handlers are configured to execute system commands with uploaded filenames as parameters.

Workaround

This vulnerability can be mitigated by disabling event handlers that include filename-based placeholders, or by setting feature.enforceReallyUniversalFilenames to true in config.yaml and restarting the application, then reviewing and deleting any suspicious files.

PoC

via the file upload process when a specially crafted filename is included in a command defined in a system event handler and the corresponding event is triggered.

CVSS Base Scores

version 4.0
version 3.1