CVE-2023-22492: Github.com/zitadel/zitadel Zitadel RefreshToken Invalidation Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-6rrr-78xp-5jp8
CVSS 5.9
CWE-613
Published
Advisory Summary

CVE-2023-22492 is a MODERATE (CVSS 5.9) zitadel refreshtoken invalidation vulnerability vulnerability (CWE-613: Insufficient Session Expiration) affecting Github.com/zitadel/zitadel libraries in the Go ecosystem. The issue involves zitadel refreshtoken invalidation vulnerability. Remediation is available by upgrading affected packages to version 2.17.3, 2.16.4.

CVE-2023-22492 at a Glance

CVE Identifier CVE-2023-22492
GHSA Identifier GHSA-6rrr-78xp-5jp8
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Github.com/zitadel/zitadel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2023-22492

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.17.3
Upgrade github.com/zitadel/zitadel to 2.17.3
github.com/zitadel/zitadel fixed: 2.16.4
Upgrade github.com/zitadel/zitadel to 2.16.4
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-2023-22492, 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.17.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-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". 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 RefreshTokens is an OAuth 2.0 feature that allows applications to retrieve new access tokens and refresh the user's session without the need for interacting with a UI. RefreshTokens were not invalidated when a user was locked or deactivated. The deactivated or locked user was able to obtain a valid access token only through a refresh token grant. When the locked or deactivated user’s session was already terminated (“logged out”) then it was not possible to create a new session. Renewal of access token through a refresh token grant is limited to the configured amount of time (RefreshTokenExpiration). ### Patches 2.x versions are fixed on >= [2.17.3](https://github.com/zitadel/zitadel/releases/tag/v2.17.3) 2.16.x versions are fixed on >= [2.16.4](https://github.com/zitadel/zitadel/releases/tag/v2.16.4) ZITADEL recommends upgrading to the latest versions available in due course. ### Workarounds Ensure the RefreshTokenExpiration in the OIDC settings of your instance is set according to your security requirements. ### References https://zitadel.com/docs/guides/manage/console/instance-settings#oidc-token-lifetimes-and-expiration

CVE-2023-22492 Affected Github.com/zitadel/zitadel Versions

2 component(s)
Fixed Versions:
2.17.32.16.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/zitadel/zitadel
Go
≥ 2.17.0
< 2.17.3
2.17.3
github.com/zitadel/zitadel
Go
≥ 2.0.0
< 2.16.4
2.16.4

References

Frequently Asked Questions

What is CVE-2023-22492?
CVE-2023-22492 is a security vulnerability in Github.com/zitadel/zitadel involving Zitadel RefreshToken invalidation vulnerability under CWE-613: Insufficient Session Expiration.
Which Github.com/zitadel/zitadel versions are affected?
Affected versions include releases prior to 2.17.3, 2.16.4 across affected packages: github.com/zitadel/zitadel.
What version fixes CVE-2023-22492?
Upgrading to 2.17.3, 2.16.4 (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.17.3, 2.16.4. Upgrade your dependency to 2.17.3, 2.16.4 or later.
What is the CVSS score of CVE-2023-22492?
CVE-2023-22492 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2023-22492?
CVE-2023-22492 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Go dependencies for CVE-2023-22492?
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-6rrr-78xp-5jp8",
  "modified" : "2023-01-24T18:55:45Z",
  "published" : "2023-01-11T18:27:48Z",
  "aliases" : [ "CVE-2023-22492" ],
  "summary" : "Zitadel RefreshToken invalidation vulnerability",
  "details" : "### Impact\nRefreshTokens is an OAuth 2.0 feature that allows applications to retrieve new access tokens and refresh the user's session without the need for interacting with a UI.\n\nRefreshTokens were not invalidated when a user was locked or deactivated. The deactivated or locked user was able to obtain a valid access token only through a refresh token grant.\n\nWhen the locked or deactivated user’s session was already terminated (“logged out”) then it was not possible to create a new session. Renewal of access token through a refresh token grant is limited to the configured amount of time (RefreshTokenExpiration).\n\n### Patches\n2.x versions are fixed on >= [2.17.3](https://github.com/zitadel/zitadel/releases/tag/v2.17.3)\n2.16.x versions are fixed on >= [2.16.4](https://github.com/zitadel/zitadel/releases/tag/v2.16.4)\n\nZITADEL recommends upgrading to the latest versions available in due course.\n\n### Workarounds\nEnsure the RefreshTokenExpiration in the OIDC settings of your instance is set according to your security requirements.\n\n### References\n\nhttps://zitadel.com/docs/guides/manage/console/instance-settings#oidc-token-lifetimes-and-expiration\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.17.0"
      }, {
        "fixed" : "2.17.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zitadel/zitadel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.16.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/security/advisories/GHSA-6rrr-78xp-5jp8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22492"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/301e22c4956ead6014a8179463c37263f7301a83"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/commit/fc892c52a10cd4ffdac395747494f3a93a7494c2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zitadel/zitadel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.16.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zitadel/zitadel/releases/tag/v2.17.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-11T18:27:48Z",
    "nvd_published_at" : "2023-01-11T20:15:00Z"
  }
}