CVE-2022-36051: Github.com/zitadel/zitadel Broken Authorization Vulnerability

HIGH
Advisory Identifier: GHSA-c8fj-4pm8-mp2c
CVSS 8.7
CWE-436 CWE-863
Published
Advisory Summary

CVE-2022-36051 is a HIGH (CVSS 8.7) broken authorization vulnerability (CWE-436: Interpretation Conflict) affecting Github.com/zitadel/zitadel libraries in the Go ecosystem. The issue involves broken authorization in zitadel actions. Remediation is available by upgrading affected packages to version 2.2.0, 1.87.1.

CVE-2022-36051 at a Glance

CVE Identifier CVE-2022-36051
GHSA Identifier GHSA-c8fj-4pm8-mp2c
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-436: Interpretation Conflict
Affected Product Github.com/zitadel/zitadel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.7

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

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

How to Fix CVE-2022-36051

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.2.0
Upgrade github.com/zitadel/zitadel to 2.2.0
github.com/zitadel/zitadel fixed: 1.87.1
Upgrade github.com/zitadel/zitadel to 1.87.1
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-2022-36051, 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.2.0), 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-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. 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 **Actions**, introduced in ZITADEL **1.42.0** on the API and **1.56.0** for Console, is a feature, where users with role `ORG_OWNER` are able to create Javascript Code, which is invoked by the system at certain points during the login. **Actions**, for example, allow creating authorizations (user grants) on newly created users programmatically. Due to a missing authorization check, **Actions** were able to grant authorizations for projects that belong to other organisations inside the same Instance. Granting authorizations via API and Console is not affected by this vulnerability. ### Patches 2.x versions are fixed on >= [2.2.0](https://github.com/zitadel/zitadel/releases/tag/v2.2.0) 1.x versions are fixed on >= [1.87.1](https://github.com/zitadel/zitadel/releases/tag/v1.87.1) ZITADEL recommends upgrading to the latest versions available in due course. ### Workarounds There is no workaround since a patch is already available. ### Who did disclose this During our recurring white box penetration test our external security consultant found this issue. The full report will be made public after the complete review. ### References https://docs.zitadel.com/docs/guides/manage/customize/behavior https://docs.zitadel.com/docs/apis/actions https://zitadel.com/blog/pentest-results-h1-2021 ### Questions If you have any questions or comments about this advisory: * Email us at [security@zitadel.com](mailto:security@zitadel.com)

CVE-2022-36051 Affected Github.com/zitadel/zitadel Versions

2 component(s)
Fixed Versions:
2.2.01.87.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/zitadel/zitadel
Go
≥ 2.0.0
< 2.2.0
2.2.0
github.com/zitadel/zitadel
Go
≥ 1.42.0
< 1.87.1
1.87.1

References

Frequently Asked Questions

What is CVE-2022-36051?
CVE-2022-36051 is a security vulnerability in Github.com/zitadel/zitadel involving Broken Authorization in ZITADEL Actions under CWE-436: Interpretation Conflict.
Which Github.com/zitadel/zitadel versions are affected?
Affected versions include releases prior to 2.2.0, 1.87.1 across affected packages: github.com/zitadel/zitadel.
What version fixes CVE-2022-36051?
Upgrading to 2.2.0, 1.87.1 (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.2.0, 1.87.1. Upgrade your dependency to 2.2.0, 1.87.1 or later.
What is the CVSS score of CVE-2022-36051?
CVE-2022-36051 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2022-36051?
CVE-2022-36051 is classified under CWE-436: Interpretation Conflict (Product A handles inputs or steps differently than Product B, which causes A to perform incorrect actions based on its perception of B's state.).
How can I check Go dependencies for CVE-2022-36051?
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-c8fj-4pm8-mp2c",
  "modified" : "2022-08-30T20:54:28Z",
  "published" : "2022-08-30T20:54:28Z",
  "aliases" : [ "CVE-2022-36051" ],
  "summary" : "Broken Authorization in ZITADEL Actions",
  "details" : "### Impact\n\n**Actions**, introduced in ZITADEL **1.42.0** on the API and **1.56.0** for Console, is a feature, where users with role `ORG_OWNER` are able to create Javascript Code, which is invoked by the system at certain points during the login.\n**Actions**, for example, allow creating authorizations (user grants) on newly created users programmatically.\nDue to a missing authorization check, **Actions** were able to grant authorizations for projects that belong to other organisations inside the same Instance. Granting authorizations via API and Console is not affected by this vulnerability.\n\n### Patches\n\n2.x versions are fixed on >= [2.2.0](https://github.com/zitadel/zitadel/releases/tag/v2.2.0)\n1.x versions are fixed on >= [1.87.1](https://github.com/zitadel/zitadel/releases/tag/v1.87.1)\n\nZITADEL recommends upgrading to the latest versions available in due course.\n\n### Workarounds\n\nThere is no workaround since a patch is already available.\n\n### Who did disclose this\n\nDuring our recurring white box penetration test our external security consultant found this issue.\nThe full report will be made public after the complete review.\n\n### References\n\nhttps://docs.zitadel.com/docs/guides/manage/customize/behavior\nhttps://docs.zitadel.com/docs/apis/actions\nhttps://zitadel.com/blog/pentest-results-h1-2021\n\n### Questions\n\nIf you have any questions or comments about this advisory:\n* Email us at [security@zitadel.com](mailto:security@zitadel.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.42.0"
      }, {
        "fixed" : "1.87.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/security/advisories/GHSA-c8fj-4pm8-mp2c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36051"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/pull/4237"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/pull/4238"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v1.87.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.2.0"
  }, {
    "type" : "PACKAGE",
    "url" : "github.com/zitadel/zitadel"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-436", "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-30T20:54:28Z",
    "nvd_published_at" : "2022-08-31T23:15:00Z"
  }
}