CVE-2024-41953
JSON

4.3medium

Zitadel improperly sanitizes HTML in emails and Console UI

Severity
4.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.05% (higher than 64% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-v333-7h2p-5fhvGO-2024-3015

Description

Zitadel is an open source identity management system. ZITADEL uses HTML for emails and renders certain information such as usernames dynamically. That information can be entered by users or administrators. Due to a missing output sanitization, these emails could include malicious code. This may potentially lead to a threat where an attacker, without privileges, could send out altered notifications that are part of the registration processes. An attacker could create a malicious link, where the injected code would be rendered as part of the email. On the user's detail page, the username was also not sanitized and would also render HTML, giving an attacker the same vulnerability. While it was possible to inject HTML including javascript, the execution of such scripts would be prevented by most email clients and the Content Security Policy in Console UI. This vulnerability is fixed in 2.58.1, 2.57.1, 2.56.2, 2.55.5, 2.54.8 2.53.9, and 2.52.3.

Affected

Product or packageVersionsReported by
zitadel zitadel>= 2.52.0, < 2.52.3, >= 2.53.0, < 2.53.9, >= 2.54.0, < 2.54.8, >= 2.55.0, < 2.55.5, >= 2.56.0, < 2.56.2, >= 2.57.0, < 2.57.1, >= 2.58.0, < 2.58.1, from 2.52.0 before 2.52.3 and 6 moreCVE List, NVD
github.com/zitadel/zitadel (Go)from 1.80.1 before 2.52.3, from 2.53.0 before 2.53.9, from 2.54.0 before 2.54.8, from 2.55.0 before 2.55.5, from 2.56.0 before 2.56.2, from 2.57.0 before 2.57.1, from 2.58.0 before 2.58.1, before 0.0.0-20240731122110-189505c80fa6 and 2 moreGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
GitHub4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

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

What each source says

CVE List

Zitadel is an open source identity management system. ZITADEL uses HTML for emails and renders certain information such as usernames dynamically. That information can be entered by users or administrators. Due to a missing output sanitization, these emails could include malicious code. This may potentially lead to a threat where an attacker, without privileges, could send out altered notifications that are part of the registration processes. An attacker could create a malicious link, where the injected code would be rendered as part of the email. On the user's detail page, the username was also not sanitized and would also render HTML, giving an attacker the same vulnerability. While it was possible to inject HTML including javascript, the execution of such scripts would be prevented by most email clients and the Content Security Policy in Console UI. This vulnerability is fixed in 2.58.1, 2.57.1, 2.56.2, 2.55.5, 2.54.8 2.53.9, and 2.52.3.

GitHub Advisory Database
Impact

ZITADEL uses HTML for emails and renders certain information such as usernames dynamically. That information can be entered by users or administrators. Due to a missing output sanitization, these emails could include malicious code. This may potentially lead to a threat where an attacker, without privileges, could send out altered notifications that are part of the registration processes. An attacker could create a malicious link, where the injected code would be rendered as part of the email.

During investigation of this issue a related issue was found and mitigated, where on the user's detail page the username was not sanitized and would also render HTML, giving an attacker the same vulnerability.

While it was possible to inject HTML including javascript, the execution of such scripts would be prevented by most email clients and the Content Security Policy in Console UI.

Patches

2.x versions are fixed on >= 2.58.1 2.57.x versions are fixed on >= 2.57.1 2.56.x versions are fixed on >= 2.56.2 2.55.x versions are fixed on >= 2.55.5 2.54.x versions are fixed on >= 2.54.8 2.53.x versions are fixed on >= 2.53.9 2.52.x versions are fixed on >= 2.52.9

Workarounds

There is no workaround since a patch is already available.

Questions

If you have any questions or comments about this advisory, please email us at security@zitadel.com

Credits

Thanks to Sushmita Poudel and David Underwood for reporting this.

Go Vulnerability Database

ZITADEL has improper HTML sanitization in emails and Console UI in github.com/zitadel/zitadel.

NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.

(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)

The additional affected modules and versions are: github.com/zitadel/zitadel from v2.52.0 before v2.52.3, from v2.53.0 before v2.53.9, from v2.54.0 before v2.54.8, from v2.55.0 before v2.55.5, from v2.56.0 before v2.56.2, from v2.57.0 before v2.57.1, from v2.58.0 before v2.58.1.

NVD (es)

Zitadel es un sistema de gestión de identidades de código abierto. ZITADEL utiliza HTML para los correos electrónicos y muestra cierta información, como los nombres de usuario, de forma dinámica. Esa información puede ser ingresada por usuarios o administradores. Debido a la falta de sanitización de la salida, estos correos electrónicos podrían incluir código malicioso. Esto puede generar potencialmente una amenaza en la que un atacante, sin privilegios, podría enviar notificaciones alteradas que forman parte de los procesos de registro. Un atacante podría crear un enlace malicioso, donde el código inyectado se presentaría como parte del correo electrónico. En la página de detalles del usuario, el nombre de usuario tampoco estaba sanitizado y también representaba HTML, lo que le daba al atacante la misma vulnerabilidad. Si bien era posible inyectar HTML, incluido JavaScript, la mayoría de los clientes de correo electrónico y la Política de seguridad de contenido en la interfaz de usuario de la consola impedirían la ejecución de dichos scripts. Esta vulnerabilidad se solucionó en 2.58.1, 2.57.1, 2.56.2, 2.55.5, 2.54.8 2.53.9 y 2.52.3.

References

https://github.com/zitadel/zitadel/security/advisories/GHSA-v333-7h2p-5fhvadvisory, vendor-advisory, web
https://github.com/zitadel/zitadel/commit/0e1f99e987b5851caec45a72660fe9f67e425747fix, patch, web
https://github.com/zitadel/zitadel/commit/38da602ee1cfc35c0d7918c298fbfc3f3674133bfix, patch, web
https://github.com/zitadel/zitadel/commit/4b59cac67bb89c1f3f84a2041dd273d11151d29ffix, patch, web
https://github.com/zitadel/zitadel/commit/c1a3fc72dde16e987d8a09aa291e7c2edfc928f7fix, patch, web
https://github.com/zitadel/zitadel/commit/c353f82f89c6982c0888c6763363296cf4263cb2fix, patch, web
https://github.com/zitadel/zitadel/commit/d04ac6df8f2f0243e649b802a8bfa6176cef0923fix, patch, web
https://github.com/zitadel/zitadel/commit/f846616a3f022e88e3ea8cea05d3254ad86f1615fix, patch, web
https://github.com/zitadel/zitadel/releases/tag/v2.52.3release-notes, web
https://github.com/zitadel/zitadel/releases/tag/v2.53.9release-notes, web
https://github.com/zitadel/zitadel/releases/tag/v2.54.8release-notes, web
https://github.com/zitadel/zitadel/releases/tag/v2.55.5release-notes, web

Sources

SourceRecordLicence
CVE ListCVE-2024-41953 changed 2024-08-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-v333-7h2p-5fhv changed 2025-07-09CC-BY-4.0
Go Vulnerability DatabaseGO-2024-3015 changed 2024-08-06CC-BY-4.0
NVDCVE-2024-41953 changed 2026-06-17Public domain