4.3medium
ZITADEL's truncated opaque tokens are still valid
- Severity
- 4.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.16% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6mq3-xmgp-pjm5GO-2026-4573
Description
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 `<token_id>:<user_id>`. v2 tokens distinguished further where the `token_id` is of the format `v2_<oidc_session_id>-at_<access_token_id>`. V1 token authZ/N session data is retrieved from the database using the (simple) `token_id` value and `user_id` value. The `user_id` (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 `oidc_session_id` and `access_token_id` and in this case the `user_id` from the token is ignored and taken from the session data in the database. By truncating the token to 80 chars, the user_id 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 `user_id` from the token against the session data from the database. No known workarounds are available.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| zitadel zitadel | >= 4.0.0, < 4.11.0, >= 3.0.0, < 3.4.7, >= 2.31.0, <= 2.71.19, from 2.31.0 up to 2.71.19, from 3.0.0 before 3.4.7, from 4.0.0 before 4.11.0 | CVE List, NVD |
| github.com/zitadel/zitadel (Go) | from 4.0.0 before 4.11.0, from 3.0.0 before 3.4.7, from 2.31.0 up to 2.71.19, before 1.80.0-v2.20.0.20260216092519-feab8e1fa371, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| GitHub | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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 `<token_id>:<user_id>`. v2 tokens distinguished further where the `token_id` is of the format `v2_<oidc_session_id>-at_<access_token_id>`. V1 token authZ/N session data is retrieved from the database using the (simple) `token_id` value and `user_id` value. The `user_id` (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 `oidc_session_id` and `access_token_id` and in this case the `user_id` from the token is ignored and taken from the session data in the database. By truncating the token to 80 chars, the user_id 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 `user_id` from the token against the session data from the database. No known workarounds are available.
GitHub Advisory Database
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 <token_id>:<user_id>. v2 tokens distinguished further where the token_id is of the format v2_<oidc_session_id>-at_<access_token_id>. This is an example of such a cleartext: V2_354201447279099906-at_354201447279165442:354201364702363650
Impact
V1 token authZ/N session data is retrieved from the database using the (simple) token_id value and user_id value. The user_id (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 oidc_session_id and access_token_id and in this case the user_id from the token is ignored and taken from the session data in the database.
By truncating the token to 80 chars, the user_id is now missing from the cleartext of the v2 token: V2_354201447279099906-at_354201447279165442: 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.0through4.10.1 - 3.x:
3.0.0through3.4.6 - 2.x:
2.31.0through2.71.19
Patches
The vulnerability has been addressed in the latest releases. The patch resolves the issue by verifying the user_id 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.
Go Vulnerability Database
ZITADEL's truncated opaque tokens are still valid in github.com/zitadel/zitadel.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/zitadel/zitadel from v3.0.0 before v3.4.7; github.com/zitadel/zitadel from v4.0.0 before v4.11.0.
NVD (es)
ZITADEL es una plataforma de gestión de identidades de código abierto. A partir de la versión 2.31.0 y antes de las versiones 3.4.7 y 4.11.0, los tokens de acceso OIDC opacos en formato v2 truncados a 80 caracteres todavía se consideran válidos. Zitadel utiliza un cifrado AES simétrico para tokens opacos. La carga útil en texto claro es una concatenación de un par de identificadores, como un ID de token y un ID de usuario. Internamente, Zitadel tiene 2 versiones diferentes de cargas útiles de token. Los tokens v1 ya no se crean, pero aún se verifican para no invalidar las sesiones existentes después de la actualización. La carga útil en texto claro tiene un formato de ':'. Los tokens v2 se distinguen aún más donde el 'token_id' tiene el formato 'v2_-at_'. Los datos de sesión de authZ/N del token v1 se recuperan de la base de datos utilizando el valor (simple) de 'token_id' y el valor de 'user_id'. El 'user_id' (llamado 'subject' en algunas partes de nuestro código) se utilizaba como el ID de usuario de confianza. Los datos de sesión de authZ/N del token v2 se recuperan de la base de datos utilizando el 'oidc_session_id' y el 'access_token_id' y, en este caso, el 'user_id' del token se ignora y se toma de los datos de sesión en la base de datos. Al truncar el token a 80 caracteres, el 'user_id' ahora falta en el texto claro del token v2. El back-end todavía acepta esto por las razones mencionadas. Este problema no se considera explotable, pero puede parecer incómodo cuando se reproduce. El parche en las versiones 4.11.0 y 3.4.7 resuelve el problema verificando el 'user_id' del token contra los datos de sesión de la base de datos. No se conocen soluciones alternativas disponibles.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-27840 changed 2026-02-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6mq3-xmgp-pjm5 changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4573 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-27840 changed 2026-06-17 | Public domain |