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

    Threat Intelligence

    EPSS
    0.06% (30th 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 ID SNYK-GOLANG-GITHUBCOMZITADELZITADELINTERNALAPIASSETS-6038019
  • published 27 Oct 2023
  • disclosed 26 Oct 2023
  • credit Skelmis

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 Scores

version 3.1
Expand this section

Snyk

Recommended
8.7 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    Required
  • Scope (S)
    Changed
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    None
Expand this section

NVD

5.4 medium