Summary
Opaque OIDC access tokens in v2 format, truncated to 80 characters are still considered valid.
ZITADEL uses a symmetric AES encryption for opaque tokens. The cleartext payload is a concatenation of a couple of identifiers, such as a token ID and user ID. Internally Zitadel has 2 different versions of token payloads. v1 tokens are no longer created, but are still verified as to not invalidate existing session after upgrade.
The cleartext payload has a format of <tokenid>:<userid>. v2 tokens distinguished further where the tokenid is of the format v2<oidcsessionid>-at<accesstokenid>. This is an example of such a cleartext: V2354201447279099906-at354201447279165442:354201364702363650
Impact
V1 token authZ/N session data is retrieved from the database using the (simple) tokenid value and userid value. The userid (called subject in some parts of our code) was used as being the trusted user ID.
V2 token authZ/N session data is retrieved from the database using the oidcsessionid and accesstokenid and in this case the userid from the token is ignored and taken from the session data in the database.
By truncating the token to 80 chars, the userid is now missing from the cleartext of the v2 token: V2354201447279099906-at354201447279165442: The back-end still accepts this for above reasons.
This issue is not considered exploitable, but may look awkward when reproduced.
Affected Versions
All versions within the following ranges, including release candidates (RCs), are affected: - v4.x: 4.0.0 through 4.10.1 - 3.x: 3.0.0 through 3.4.6 - 2.x: 2.31.0 through 2.71.19
Patches
The vulnerability has been addressed in the latest releases. The patch resolves the issue by verifying the userid from the token against the session data from the database
4.x: Upgrade to >=4.11.0 3.x: Update to >=3.4.7 2.x: Update to >=3.4.7
Workarounds
The recommended solution is to update ZITADEL to a patched version.
Questions
If there any questions or comments about this advisory, please send an email to security@zitadel.com
Credits
ZITADEL thanks Olivier Becker and Lucas Dodgson for reporting this vulnerability.
Summary
A user enumeration vulnerability has been discovered in Zitadel's login interfaces. An unauthenticated attacker can exploit this flaw to confirm the existence of valid user accounts by iterating through usernames and userIDs.
Impact
The login UIs (in version 1 and 2) provide the possibility to request a password reset, where an email will be sent to the user with a link to a verification endpoint. By submitting arbitrary userIDs to these endpoints, an attacker can differentiate between valid and invalid accounts based on the system's response.
For an effective exploit the attacker needs to iterate through the potential set of userIDs. The impact can be limited by implementing rate limiting or similar measures to limit enumeration of userIDs.
Additionally, Zitadel includes a security feature "Ignoring unknown usernames", designed to prevent username enumeration attacks by presenting a generic response for both valid and invalid usernames on the login page. The login UI V2 did not handle the setting correctly and would allow attackers to enumerate through usernames to check their existence.
Affected Versions
All versions within the following ranges, including release candidates (RCs), are affected: - v4.x: 4.0.0 through 4.9.0 - 3.x: 3.0.0 through 3.4.5 - 2.x: 2.0.0 through 2.71.19
Patches
The vulnerability has been addressed in the latest releases. The patch resolves the issue by returning a generic error message, which does not indicate it the user exists.
4.x: Upgrade to >=4.9.1 3.x: Update to >=3.4.6 2.x: Update to >=3.4.6
Workarounds
The recommended solution is to update ZITADEL to a patched version. You can limit the impact by implementing rate limiting or similar measures to limit enumeration of userIDs.
There is no workaround for the "Ignoring unknown usernames" issue in login V2. Please upgrade to a patched version, if you rely on this feature.
Questions
If you have any questions or comments about this advisory, please email us at security@zitadel.com
Credits
Thanks to Niklas Kunz from Seamly for reporting this vulnerability from their pentest.
Summary
Zitadel's User Service discloses the total number of instance users to unauthorized users.
Impact
The ZITADEL User Service exposes the total number of users within an instance to any authenticated user, regardless of their specific permissions. While this does not leak individual user data or PII, disclosing the total user count via the totalResult field constitutes an information disclosure vulnerability that may be sensitive in certain contexts.
Affected Versions
Systems running one of the following version are affected:
- 4.x: 4.0.0-rc.1 through 4.7.1 - 3.x: 3.0.0-rc.1 through 3.4.4 - 2.x: 2.44.0 through 2.71.19
Patches
The vulnerability has been addressed in the latest release. The patch resolves the issue and returns the totalResult value corresponding to the number of instance users for whom the querying user has read permission.
- 4.x: Upgrade to >= 4.7.2 - 3.x: Update to >= 3.4.5 - 2.x: Update to >= 3.4.5 (or checkout the workarounds section)
Workarounds
The recommended solution is to update Zitadel to a patched version.
If a version upgrade is not possible, you can enable the permissionCheckV2 feature on your instance.
Questions
If you have any questions or comments about this advisory, please email us at security@zitadel.com
Credits
This vulnerability was found by zentrust partners GmbH during a scheduled penetration test. Thank you to the analysts Martin Tschirsich, Joud Zakharia, Christopher Baumann. The full report will be made public after the complete review.