CVE-2024-41953: Github.com/zitadel/zitadel ZITADEL Has Improper HTML Sanitization Vulnerability

MODERATE
Advisory Identifier: GHSA-v333-7h2p-5fhv
CVSS 4.3
CWE-79
Published
Advisory Summary

CVE-2024-41953 is a MODERATE (CVSS 4.3) zitadel has improper html sanitization vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/zitadel/zitadel libraries in the Go ecosystem. The issue involves zitadel has improper html sanitization in emails and console ui. Remediation is available by upgrading affected packages to version 2.52.3, 2.53.9, 2.54.8, 2.55.5, 2.56.2, 2.57.1, 2.58.1, 0.0.0-20240731122110-189505c80fa6, 1.80.0-v2.20.0.20240731122110-189505c80fa6.

CVE-2024-41953 at a Glance

CVE Identifier CVE-2024-41953
GHSA Identifier GHSA-v333-7h2p-5fhv
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Github.com/zitadel/zitadel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-41953

To remediate this vulnerability, upgrade all affected Github.com/zitadel/zitadel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/zitadel/zitadel fixed: 2.52.3
Upgrade github.com/zitadel/zitadel to 2.52.3
github.com/zitadel/zitadel fixed: 2.53.9
Upgrade github.com/zitadel/zitadel to 2.53.9
github.com/zitadel/zitadel fixed: 2.54.8
Upgrade github.com/zitadel/zitadel to 2.54.8
github.com/zitadel/zitadel fixed: 2.55.5
Upgrade github.com/zitadel/zitadel to 2.55.5
github.com/zitadel/zitadel fixed: 2.56.2
Upgrade github.com/zitadel/zitadel to 2.56.2
github.com/zitadel/zitadel fixed: 2.57.1
Upgrade github.com/zitadel/zitadel to 2.57.1
github.com/zitadel/zitadel fixed: 2.58.1
Upgrade github.com/zitadel/zitadel to 2.58.1
github.com/zitadel/zitadel fixed: 0.0.0-20240731122110-189505c80fa6
Upgrade github.com/zitadel/zitadel to 0.0.0-20240731122110-189505c80fa6
github.com/zitadel/zitadel fixed: 1.80.0-v2.20.0.20240731122110-189505c80fa6
Upgrade github.com/zitadel/zitadel to 1.80.0-v2.20.0.20240731122110-189505c80fa6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/zitadel/zitadel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-41953, inspect your project dependencies for Github.com/zitadel/zitadel:

inspect dependencies for github.com/zitadel/zitadel

Analyze the terminal output to locate any version of Github.com/zitadel/zitadel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.52.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/zitadel/zitadel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact ZITADEL uses HTML for emails and renders certain information such as usernames dynamically. That information can be entered by users or administrators. Due to a missing output sanitization, these emails could include malicious code. This may potentially lead to a threat where an attacker, without privileges, could send out altered notifications that are part of the registration processes. An attacker could create a malicious link, where the injected code would be rendered as part of the email. During investigation of this issue a related issue was found and mitigated, where on the user's detail page the username was not sanitized and would also render HTML, giving an attacker the same vulnerability. While it was possible to inject HTML including javascript, the execution of such scripts would be prevented by most email clients and the Content Security Policy in Console UI. ### Patches 2.x versions are fixed on >= [2.58.1](https://github.com/zitadel/zitadel/releases/tag/v2.58.1) 2.57.x versions are fixed on >= [2.57.1](https://github.com/zitadel/zitadel/releases/tag/v2.57.1) 2.56.x versions are fixed on >= [2.56.2](https://github.com/zitadel/zitadel/releases/tag/v2.56.2) 2.55.x versions are fixed on >= [2.55.5](https://github.com/zitadel/zitadel/releases/tag/v2.55.5) 2.54.x versions are fixed on >= [2.54.8](https://github.com/zitadel/zitadel/releases/tag/v2.54.8) 2.53.x versions are fixed on >= [2.53.9](https://github.com/zitadel/zitadel/releases/tag/v2.53.9) 2.52.x versions are fixed on >= [2.52.9](https://github.com/zitadel/zitadel/releases/tag/v2.52.3) ### Workarounds There is no workaround since a patch is already available. ### Questions If you have any questions or comments about this advisory, please email us at [security@zitadel.com](mailto:security@zitadel.com) ### Credits Thanks to Sushmita Poudel and David Underwood for reporting this.

CVE-2024-41953 Affected Github.com/zitadel/zitadel Versions

9 component(s)
Fixed Versions:
2.52.32.53.92.54.82.55.52.56.22.57.12.58.10.0.0-20240731122110-189505c80fa61.80.0-v2.20.0.20240731122110-189505c80fa6
Product / Package Ecosystem Affected Versions Fixed Version
github.com/zitadel/zitadel
Go
≥ 1.80.1
< 2.52.3
2.52.3
github.com/zitadel/zitadel
Go
≥ 2.53.0
< 2.53.9
2.53.9
github.com/zitadel/zitadel
Go
≥ 2.54.0
< 2.54.8
2.54.8
github.com/zitadel/zitadel
Go
≥ 2.55.0
< 2.55.5
2.55.5
github.com/zitadel/zitadel
Go
≥ 2.56.0
< 2.56.2
2.56.2
github.com/zitadel/zitadel
Go
≥ 2.57.0
< 2.57.1
All 1 versions
2.57.0
2.57.1
github.com/zitadel/zitadel
Go
≥ 2.58.0
< 2.58.1
All 1 versions
2.58.0
2.58.1
github.com/zitadel/zitadel
Go
< 0.0.0-20240731122110-189505c80fa6
0.0.0-20240731122110-189505c80fa6
github.com/zitadel/zitadel
Go
≥ 0.0.0
< 1.80.0-v2.20.0.20240731122110-189505c80fa6
1.80.0-v2.20.0.20240731122110-189505c80fa6

References

GitHub Advisory / Wiki ADVISORY
https://github.com/zitadel/zitadel/security/advisories/GHSA-v333-7h2p-5fhv
NVD — CVE-2024-41953 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-41953
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/0e1f99e987b5851caec45a72660fe9f67e425747
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/38da602ee1cfc35c0d7918c298fbfc3f3674133b
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/4b59cac67bb89c1f3f84a2041dd273d11151d29f
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/c1a3fc72dde16e987d8a09aa291e7c2edfc928f7
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/c353f82f89c6982c0888c6763363296cf4263cb2
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/d04ac6df8f2f0243e649b802a8bfa6176cef0923
Security Fix Commit FIX COMMIT
https://github.com/zitadel/zitadel/commit/f846616a3f022e88e3ea8cea05d3254ad86f1615
pkg.go.dev/vuln/go-2024-3015 WEB
https://pkg.go.dev/vuln/GO-2024-3015
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.58.1
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.57.1
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.56.2
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.55.5
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.54.8
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.53.9
Github.com/zitadel/zitadel Release RELEASE
https://github.com/zitadel/zitadel/releases/tag/v2.52.3
Github.com/zitadel/zitadel Source Repository REPOSITORY
https://github.com/zitadel/zitadel

Frequently Asked Questions

What is CVE-2024-41953?
CVE-2024-41953 is a security vulnerability in Github.com/zitadel/zitadel involving ZITADEL has improper HTML sanitization in emails and Console UI under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Github.com/zitadel/zitadel versions are affected?
Affected versions include releases prior to 2.52.3, 2.53.9, 2.54.8, 2.55.5, 2.56.2, 2.57.1, 2.58.1, 0.0.0-20240731122110-189505c80fa6, 1.80.0-v2.20.0.20240731122110-189505c80fa6 across affected packages: github.com/zitadel/zitadel.
What version fixes CVE-2024-41953?
Upgrading to 2.52.3, 2.53.9, 2.54.8, 2.55.5, 2.56.2, 2.57.1, 2.58.1, 0.0.0-20240731122110-189505c80fa6, 1.80.0-v2.20.0.20240731122110-189505c80fa6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/zitadel/zitadel affected?
Yes, github.com/zitadel/zitadel is affected in releases prior to 2.52.3, 2.53.9, 2.54.8, 2.55.5, 2.56.2, 2.57.1, 2.58.1, 0.0.0-20240731122110-189505c80fa6, 1.80.0-v2.20.0.20240731122110-189505c80fa6. Upgrade your dependency to 2.52.3, 2.53.9, 2.54.8, 2.55.5, 2.56.2, 2.57.1, 2.58.1, 0.0.0-20240731122110-189505c80fa6, 1.80.0-v2.20.0.20240731122110-189505c80fa6 or later.
What is the CVSS score of CVE-2024-41953?
CVE-2024-41953 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2024-41953?
CVE-2024-41953 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Go dependencies for CVE-2024-41953?
Run the dependency tree command: 'inspect dependencies for github.com/zitadel/zitadel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v333-7h2p-5fhv",
  "modified" : "2025-07-09T15:00:31Z",
  "published" : "2024-07-31T20:59:13Z",
  "aliases" : [ "CVE-2024-41953" ],
  "summary" : "ZITADEL has improper HTML sanitization in emails and Console UI",
  "details" : "### Impact\n\nZITADEL uses HTML for emails and renders certain information such as usernames dynamically. That information can be entered by users or administrators. Due to a missing output sanitization, these emails could include malicious code.\nThis may potentially lead to a threat where an attacker, without privileges, could send out altered notifications that are part of the registration processes. An attacker could create a malicious link, where the injected code would be rendered as part of the email.\n\nDuring investigation of this issue a related issue was found and mitigated, where on the user's detail page the username was not sanitized and would also render HTML, giving an attacker the same vulnerability.\n\nWhile it was possible to inject HTML including javascript, the execution of such scripts would be prevented by most email clients and the Content Security Policy in Console UI.\n\n### Patches\n\n2.x versions are fixed on >= [2.58.1](https://github.com/zitadel/zitadel/releases/tag/v2.58.1)\n2.57.x versions are fixed on >= [2.57.1](https://github.com/zitadel/zitadel/releases/tag/v2.57.1)\n2.56.x versions are fixed on >= [2.56.2](https://github.com/zitadel/zitadel/releases/tag/v2.56.2)\n2.55.x versions are fixed on >= [2.55.5](https://github.com/zitadel/zitadel/releases/tag/v2.55.5)\n2.54.x versions are fixed on >= [2.54.8](https://github.com/zitadel/zitadel/releases/tag/v2.54.8)\n2.53.x versions are fixed on >= [2.53.9](https://github.com/zitadel/zitadel/releases/tag/v2.53.9)\n2.52.x versions are fixed on >= [2.52.9](https://github.com/zitadel/zitadel/releases/tag/v2.52.3)\n\n### Workarounds\n\nThere is no workaround since a patch is already available.\n\n### Questions\n\nIf you have any questions or comments about this advisory, please email us at [security@zitadel.com](mailto:security@zitadel.com)\n\n### Credits\n\nThanks to Sushmita Poudel and David Underwood for reporting this.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.80.1"
      }, {
        "fixed" : "2.52.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.53.0"
      }, {
        "fixed" : "2.53.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.54.0"
      }, {
        "fixed" : "2.54.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.55.0"
      }, {
        "fixed" : "2.55.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.56.0"
      }, {
        "fixed" : "2.56.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.57.0"
      }, {
        "fixed" : "2.57.1"
      } ]
    } ],
    "versions" : [ "2.57.0" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.58.0"
      }, {
        "fixed" : "2.58.1"
      } ]
    } ],
    "versions" : [ "2.58.0" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20240731122110-189505c80fa6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.0"
      }, {
        "fixed" : "1.80.0-v2.20.0.20240731122110-189505c80fa6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/security/advisories/GHSA-v333-7h2p-5fhv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41953"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/0e1f99e987b5851caec45a72660fe9f67e425747"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/38da602ee1cfc35c0d7918c298fbfc3f3674133b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/4b59cac67bb89c1f3f84a2041dd273d11151d29f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/c1a3fc72dde16e987d8a09aa291e7c2edfc928f7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/c353f82f89c6982c0888c6763363296cf4263cb2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/d04ac6df8f2f0243e649b802a8bfa6176cef0923"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/f846616a3f022e88e3ea8cea05d3254ad86f1615"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3015"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.58.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.57.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.56.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.55.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.54.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.53.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.52.3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zitadel/zitadel"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-31T20:59:13Z",
    "nvd_published_at" : "2024-07-31T17:15:10Z"
  }
}