5.5medium
Jinja2 Templates are vulnerable to XSS attacks due to their configuration in OctoPrint
- Severity
- 5.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.29% (higher than 23% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xvxq-g8hw-fx4gPYSEC-2024-201
Description
OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.10.2 contain reflected XSS vulnerabilities in the login dialog and the standalone application key confirmation dialog. An attacker who successfully talked a victim into clicking on a specially crafted login link, or a malicious app running on a victim's computer triggering the application key workflow with specially crafted parameters and then redirecting the victim to the related standalone confirmation dialog could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way. The above mentioned specific vulnerabilities of the login dialog and the standalone application key confirmation dialog have been patched in the bugfix release 1.10.3 by individual escaping of the detected locations. A global change throughout all of OctoPrint's templating system with the upcoming 1.11.0 release will handle this further, switching to globally enforced automatic escaping and thus reducing the attack surface in general. The latter will also improve the security of third party plugins. During a transition period, third party plugins will be able to opt into the automatic escaping. With OctoPrint 1.13.0, automatic escaping will be switched over to be enforced even for third party plugins, unless they explicitly opt-out.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OctoPrint OctoPrint | < 1.10.3, before 1.10.3 | CVE List, NVD |
| octoprint (PyPI) | before 1.10.3 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 5.5medium CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 5.5medium CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| PyPA Advisory Database | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
What each source says
CVE List
OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.10.2 contain reflected XSS vulnerabilities in the login dialog and the standalone application key confirmation dialog. An attacker who successfully talked a victim into clicking on a specially crafted login link, or a malicious app running on a victim's computer triggering the application key workflow with specially crafted parameters and then redirecting the victim to the related standalone confirmation dialog could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way. The above mentioned specific vulnerabilities of the login dialog and the standalone application key confirmation dialog have been patched in the bugfix release 1.10.3 by individual escaping of the detected locations. A global change throughout all of OctoPrint's templating system with the upcoming 1.11.0 release will handle this further, switching to globally enforced automatic escaping and thus reducing the attack surface in general. The latter will also improve the security of third party plugins. During a transition period, third party plugins will be able to opt into the automatic escaping. With OctoPrint 1.13.0, automatic escaping will be switched over to be enforced even for third party plugins, unless they explicitly opt-out.
GitHub Advisory Database
Impact
OctoPrint versions up until and including 1.10.2 are vulnerable to reflected XSS vulnerabilities through its Jinja2 template system, as this is not configured to enforce automatic escaping. This affects, among other places, the login dialog and the standalone application key confirmation dialog.
An attacker who successfully talked a victim into clicking on or through a malicious third party app successfully redirected a victim to a specially crafted link could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way.
Patches
The above mentioned specific vulnerabilities of the login dialog and the standalone application key confirmation dialog will be patched in the bugfix release 1.10.3 by individual escaping of the detected locations. A global change throughout all of OctoPrint's templating system with the upcoming 1.11.0 release will handle this further, switching to globally enforced automatic escaping and thus reducing the attack surface in general.
The latter will also improve the security of third party plugins. During a transition period, third party plugins will be able to opt into the automatic escaping. With OctoPrint 1.13.0, automatic escaping will be switched over to be enforced even for third party plugins, unless they explicitly opt-out.
Credits
This vulnerability was discovered and responsibly disclosed to OctoPrint by Jacopo Tediosi.
NVD (es)
OctoPrint proporciona una interfaz web para controlar impresoras 3D de consumo. Las versiones de OctoPrint hasta la 1.10.2 incluida contienen vulnerabilidades XSS reflejadas en el cuadro de diálogo de inicio de sesión y en el cuadro de diálogo de confirmación de clave de aplicación independiente. Un atacante que haya logrado convencer a una víctima para que haga clic en un enlace de inicio de sesión especialmente manipulado, o una aplicación maliciosa que se ejecute en la computadora de una víctima que active el workflow de clave de aplicación con parámetros especialmente manipulados y luego redirija a la víctima al cuadro de diálogo de confirmación independiente relacionado, podría usar esto para recuperar o modificar configuraciones confidenciales, interrumpir impresiones o interactuar de otro modo con la instancia de OctoPrint de forma maliciosa. Las vulnerabilidades específicas mencionadas anteriormente del cuadro de diálogo de inicio de sesión y del cuadro de diálogo de confirmación de clave de aplicación independiente se han corregido en la versión de corrección de errores 1.10.3 mediante el escape individual de las ubicaciones detectadas. Un cambio global en todo el sistema de plantillas de OctoPrint con la próxima versión 1.11.0 se ocupará de esto aún más, cambiando a un escape automático aplicado globalmente y, por lo tanto, reduciendo la superficie de ataque en general. Este último aspecto también mejorará la seguridad de los complementos de terceros. Durante un período de transición, los complementos de terceros podrán optar por el escape automático. Con OctoPrint 1.13.0, el escape automático se implementará incluso para complementos de terceros, a menos que opten por no hacerlo explícitamente.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-49377 changed 2024-11-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xvxq-g8hw-fx4g changed 2025-01-21 | CC-BY-4.0 |
| NVD | CVE-2024-49377 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2024-201 changed 2025-01-19 | CC-BY-4.0 |