CVE-2026-27840: ZITADEL's truncated opaque tokens are still valid
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.
Other sources
ZITADEL is an open source identity management platform. Starting in version 2.31.0 and prior to versions 3.4.7 and 4.11.0, opaque OIDC access tokens in the 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>. 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. The back-end still accepts this for above reasons. This issue is not considered exploitable, but may look awkward when reproduced. The patch in versions 4.11.0 and 3.4.7 resolves the issue by verifying the userid from the token against the session data from the database. No known workarounds are available.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-27840?
CVE-2026-27840 is considered a high severity vulnerability due to its potential impact on OIDC token validity.
How do I fix CVE-2026-27840?
To fix CVE-2026-27840, update ZITADEL to version 4.11.0 or 3.4.7 or later.
Which software versions are affected by CVE-2026-27840?
CVE-2026-27840 affects ZITADEL versions from 2.31.0 to 3.4.7 and 3.4.7 to 4.11.0.
What types of tokens are impacted by CVE-2026-27840?
CVE-2026-27840 impacts the opaque OIDC access tokens that are truncated to 80 characters.
What is the underlying issue in CVE-2026-27840?
The underlying issue in CVE-2026-27840 is that truncated opaque OIDC tokens are incorrectly treated as valid.