CVE-2023-41047
Improper Neutralization of Special Elements Used in a Template Engine in OctoPrint
OctoPrint is a web interface for 3D printers. OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script that will allow code execution during rendering of that script. An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system. OctoPrint versions from 1.9.3 onward have been patched. Administrators of OctoPrint instances are advised to make sure they can trust all other administrators on their instance and to also not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
Attack profile
How easy it is to exploit
- Attack vector
- Adjacent network
- Complexity
- Low
- Privileges needed
- High
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
6.2
Improper Neutralization of Special Elements Used in a Template Engine in OctoPrint
OctoPrint is a web interface for 3D printers. OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script that will allow code execution during rendering of that script. An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system. OctoPrint versions from 1.9.3 onward have been patched. Administrators of OctoPrint instances are advised to make sure they can trust all other administrators on their instance and to also not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
- Record
CVE-2023-41047- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L - Weakness
- CWE-1336
- Updated
- 2026-11-02
EUVDEUVD-2023-0182
6.2
OctoPrint is a web interface for 3D printers. OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script that will allow code execution during rendering of that script. An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system. OctoPrint versions from 1.9.3 onward have been patched. Administrators of OctoPrint instances are advised to make sure they can trust all other administrators on their instance and to also not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
- Record
EUVD-2023-0182- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-fwfg-vprh-97ph
8.4
OctoPrint vulnerable to Improper Neutralization of Special Elements Used in a Template Engine
Impact
OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script through the Settings that will allow code execution during rendering of that script.
An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system.
Please note that GCODE files uploaded to be printed are not affected! This vulnerability exclusively affects GCODE Scripts to be executed on connection to the printer, print pause, resume etc, as described in the documentation, to be found under Settings > GCODE Scripts and configurable only by users with the ADMIN permission.
Patches
The vulnerability has been patched in version 1.9.3.
Workarounds
OctoPrint administrators are strongly advised to thoroughly vet who has admin access to their installation and to not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
Credits
This vulnerability was discovered and responsibly disclosed to OctoPrint by tianxin Wu (Bearcat), Vulnerability Researcher at Numen Cyber Labs, Singapore.
- Record
GHSA-fwfg-vprh-97ph- CVSS 4.0
- 8.4 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
NVD
6.2
OctoPrint is a web interface for 3D printers. OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script that will allow code execution during rendering of that script. An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system. OctoPrint versions from 1.9.3 onward have been patched. Administrators of OctoPrint instances are advised to make sure they can trust all other administrators on their instance and to also not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
- Record
CVE-2023-41047- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
OSV
6.2
Improper Neutralization of Special Elements Used in a Template Engine in OctoPrint
OctoPrint is a web interface for 3D printers. OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script that will allow code execution during rendering of that script. An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system. OctoPrint versions from 1.9.3 onward have been patched. Administrators of OctoPrint instances are advised to make sure they can trust all other administrators on their instance and to also not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
- Record
CVE-2023-41047- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L - Weakness
- CWE-1336
- Updated
- 2026-11-02
OSVGHSA-fwfg-vprh-97ph
8.4
OctoPrint vulnerable to Improper Neutralization of Special Elements Used in a Template Engine
Impact
OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script through the Settings that will allow code execution during rendering of that script.
An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system.
Please note that GCODE files uploaded to be printed are not affected! This vulnerability exclusively affects GCODE Scripts to be executed on connection to the printer, print pause, resume etc, as described in the documentation, to be found under Settings > GCODE Scripts and configurable only by users with the ADMIN permission.
Patches
The vulnerability has been patched in version 1.9.3.
Workarounds
OctoPrint administrators are strongly advised to thoroughly vet who has admin access to their installation and to not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
Credits
This vulnerability was discovered and responsibly disclosed to OctoPrint by tianxin Wu (Bearcat), Vulnerability Researcher at Numen Cyber Labs, Singapore.
- Record
GHSA-fwfg-vprh-97ph- CVSS 4.0
- 8.4 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-1336
- Updated
- 2026-11-02
OSVPYSEC-2023-195
6.5
OctoPrint is a web interface for 3D printers. OctoPrint versions up until and including 1.9.2 contain a vulnerability that allows malicious admins to configure a specially crafted GCODE script that will allow code execution during rendering of that script. An attacker might use this to extract data managed by OctoPrint, or manipulate data managed by OctoPrint, as well as execute arbitrary commands with the rights of the OctoPrint process on the server system. OctoPrint versions from 1.9.3 onward have been patched. Administrators of OctoPrint instances are advised to make sure they can trust all other administrators on their instance and to also not blindly configure arbitrary GCODE scripts found online or provided to them by third parties.
- Record
PYSEC-2023-195- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
octoprintPyPI |
before 1.9.3 | 1.9.3 |
octoprintPyPI |
before 1.9.3, plus listed versions 1.3.111.3.121.3.12rc11.3.12rc31.4.0 Show 45 moreShow less1.4.0rc11.4.0rc21.4.0rc31.4.0rc41.4.0rc51.4.0rc61.4.11.4.1rc11.4.1rc21.4.1rc31.4.1rc41.4.21.5.01.5.0rc11.5.0rc21.5.0rc31.5.11.5.21.5.31.6.01.6.0rc11.6.0rc21.6.0rc31.6.11.7.01.7.0rc11.7.0rc21.7.0rc31.7.11.7.21.7.31.8.01.8.0rc11.8.0rc21.8.0rc31.8.0rc41.8.0rc51.8.11.8.21.8.31.8.41.8.51.8.61.8.71.9.0 |
1.9.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-41047 is a medium vulnerability (CVSS 6.2) in Octoprint, published October 9, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.59%, the 48th percentile. Fixed in octoprint 1.9.3.
References
github.com/OctoPrint/OctoPrint/security/advisories/GHSA-fwfg-vprh-97ph
github.com/OctoPrint/OctoPrint/commit/d0072cff894509c77e243d6562245ad3079e17db
github.com/OctoPrint/OctoPrint/releases/tag/1.9.3
nvd.nist.gov/vuln/detail/CVE-2023-41047
github.com/pypa/advisory-database/tree/main/vulns/octoprint/PYSEC-2023-195.yaml
github.com/advisories/GHSA-fwfg-vprh-97ph
github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41047.json
github.com/OctoPrint/OctoPrint
Left out here: 8 versions. The JSON record has them.