CVE-2024-29891
JSON

8.7high

ZITADEL Improper Content-Type Validation Leads to Account Takeover via Stored XSS + CSP Bypass

Severity
8.7high CVSS:3.1 by GitHub_M
Exploit likelihood
0.76% (higher than 56% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-hr5w-cwwq-2v4mGO-2024-2665

Description

ZITADEL users can upload their own avatar image and various image types are allowed. Due to a missing check, an attacker could upload HTML and pretend it is an image to gain access to the victim's account in certain scenarios. A possible victim would need to directly open the supposed image in the browser, where a session in ZITADEL needs to be active for this exploit to work. The exploit could only be reproduced if the victim was using Firefox. Chrome, Safari as well as Edge did not execute the code. This vulnerability is fixed in 2.48.3, 2.47.8, 2.46.5, 2.45.5, 2.44.7, 2.43.11, and 2.42.17.

Affected

Product or packageVersionsReported by
zitadel zitadel< 2.42.17, >= 2.43.0, < 2.43.11, >= 2.44.0, < 2.44.7, >= 2.45.0, < 2.45.5, >= 2.46.0, < 2.46.5, >= 2.47.0, < 2.47.8, >= 2.48.0, < 2.48.3, before 2.42.17 and 6 moreCVE List, NVD
github.com/zitadel/zitadel (Go)before 2.42.17, from 2.43.0 before 2.43.11, from 2.44.0 before 2.44.7, from 2.45.0 before 2.45.5, from 2.46.0 before 2.46.5, from 2.47.0 before 2.47.8, from 2.48.0 before 2.48.3, all versionsGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
GitHub8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
NVD8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Classification

CWE-79CWE-434

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

What each source says

CVE List

ZITADEL users can upload their own avatar image and various image types are allowed. Due to a missing check, an attacker could upload HTML and pretend it is an image to gain access to the victim's account in certain scenarios. A possible victim would need to directly open the supposed image in the browser, where a session in ZITADEL needs to be active for this exploit to work. The exploit could only be reproduced if the victim was using Firefox. Chrome, Safari as well as Edge did not execute the code. This vulnerability is fixed in 2.48.3, 2.47.8, 2.46.5, 2.45.5, 2.44.7, 2.43.11, and 2.42.17.

GitHub Advisory Database
Impact

ZITADEL users can upload their own avatar image and various image types are allowed.

Due to a missing check, an attacker could upload HTML and pretend it is an image to gain access to the victim's account in certain scenarios. A possible victim would need to directly open the supposed image in the browser, where a session in ZITADEL needs to be active for this exploit to work.

The exploit could only be reproduced if the victim was using Firefox. Chrome, Safari as well as Edge did not execute the code.

Patches

2.x versions are fixed on >= 2.48.3 2.47.x versions are fixed on >= 2.47.8 2.46.x versions are fixed on >= 2.46.5 2.45.x versions are fixed on >= 2.45.5 2.44.x versions are fixed on >= 2.44.7 2.43.x versions are fixed on >= 2.43.11 2.42.x versions are fixed on >= 2.42.17

ZITADEL recommends upgrading to the latest versions available in due course.

Workarounds

There is no workaround since a patch is already available.

References

None

Questions

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

Credits

Thanks to Amit Laish – GE Vernova for finding and reporting the vulnerability.

Go Vulnerability Database

ZITADEL's Improper Content-Type Validation Leads to Account Takeover via Stored XSS + CSP Bypass 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 before v2.42.17, from v2.43.0 before v2.43.11, from v2.44.0 before v2.44.7, from v2.45.0 before v2.45.5, from v2.46.0 before v2.46.5, from v2.47.0 before v2.47.8, from v2.48.0 before v2.48.3.

NVD (es)

Los usuarios de ZITADEL pueden cargar su propia imagen de avatar y se permiten varios tipos de imágenes. Debido a la falta de un cheque, un atacante podría cargar HTML y pretender que es una imagen para obtener acceso a la cuenta de la víctima en ciertos escenarios. Una posible víctima necesitaría abrir directamente la supuesta imagen en el navegador, donde debe haber una sesión activa en ZITADEL para que este exploit funcione. El exploit sólo podría reproducirse si la víctima estuviera usando Firefox. Chrome, Safari y Edge no ejecutaron el código. Esta vulnerabilidad se solucionó en 2.48.3, 2.47.8, 2.46.5, 2.45.5, 2.44.7, 2.43.11 y 2.42.17.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-29891 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-hr5w-cwwq-2v4m changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2024-2665 changed 2024-07-09CC-BY-4.0
NVDCVE-2024-29891 changed 2026-06-17Public domain