Impact
ZITADEL users can upload their own avatar image. Various image types are allowed including SVG.
SVG can include scripts, such as javascript, which can be executed during rendering.
Due to a missing security header, an attacker could inject code to an SVG to gain access to the victim’s account in certain scenarios.
A possible victim would need to directly open the malicious image in the browser, where a single session in ZITADEL needs to be active for this exploit to work.
If the possible victim had multiple or no active sessions in ZITADEL, the attack would not succeed. Furthermore, the display of the user's avatar in Console and the login UI was never affected by this issue, as SVG images are converted and the code is not executed.
Patches
2.x versions are fixed on >= 2.39.2
2.38.x versions are fixed on >= 2.38.2
ZITADEL recommends upgrading to the latest versions available in due course.
Workarounds
For self-hosted environments unable to upgrade to a patched version, add a the following response header (e.g. within your WAF or reverse proxy) to the assets path ($ZITADEL_DOMAIN/assets/v1/*
):
Content-Security-Policy: default-src 'none';img-src 'self';object-src 'none';style-src 'self';media-src 'none';frame-src 'none';frame-ancestors 'none';font-src 'self';script-src 'self';manifest-src 'self';connect-src 'self'
References
None
Questions
If you have any questions or comments about this advisory, please email us at security@zitadel.com
Impact
ZITADEL users can upload their own avatar image. Various image types are allowed including SVG.
SVG can include scripts, such as javascript, which can be executed during rendering.
Due to a missing security header, an attacker could inject code to an SVG to gain access to the victim’s account in certain scenarios.
A possible victim would need to directly open the malicious image in the browser, where a single session in ZITADEL needs to be active for this exploit to work.
If the possible victim had multiple or no active sessions in ZITADEL, the attack would not succeed. Furthermore, the display of the user's avatar in Console and the login UI was never affected by this issue, as SVG images are converted and the code is not executed.
Patches
2.x versions are fixed on >= 2.39.2
2.38.x versions are fixed on >= 2.38.2
ZITADEL recommends upgrading to the latest versions available in due course.
Workarounds
For self-hosted environments unable to upgrade to a patched version, add a the following response header (e.g. within your WAF or reverse proxy) to the assets path (
$ZITADEL_DOMAIN/assets/v1/*
):Content-Security-Policy: default-src 'none';img-src 'self';object-src 'none';style-src 'self';media-src 'none';frame-src 'none';frame-ancestors 'none';font-src 'self';script-src 'self';manifest-src 'self';connect-src 'self'
References
None
Questions
If you have any questions or comments about this advisory, please email us at security@zitadel.com