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


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.06% (32nd percentile)

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 Learn

Learn about Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMZITADELZITADELINTERNALAPIASSETS-6038019
  • published27 Oct 2023
  • disclosed26 Oct 2023
  • creditSkelmis

Introduced: 26 Oct 2023

CVE-2023-46238  (opens in a new tab)
CWE-79  (opens in a new tab)

How 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'

CVSS Base Scores

version 3.1