Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') Affecting github.com/zitadel/zitadel/internal/api/assets package, versions <2.38.2 >=2.39.0 <2.39.2
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-GOLANG-GITHUBCOMZITADELZITADELINTERNALAPIASSETS-6038019
- published 27 Oct 2023
- disclosed 26 Oct 2023
- credit Skelmis
Introduced: 26 Oct 2023
CVE-2023-46238 Open this link in a new tabHow to fix?
Upgrade github.com/zitadel/zitadel/internal/api/assets
to version 2.38.2, 2.39.2 or higher.
Overview
Affected versions of this package are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') when uploading an avatar image, due to a missing security header. An attacker can inject code into an SVG image to gain access to the victim's account by executing the script during rendering. This is exploitable if the victim directly opens the malicious image in the browser and has a single active session in ZITADEL.
Workaround
This vulnerability can be mitigated by adding 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'