CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-27840

ZITADEL Opaque Token Validation Logic Flaw

Alon Barad
Alon Barad
Software Engineer

Feb 28, 2026·6 min read·20 visits

Executive Summary (TL;DR)

ZITADEL fails to verify the full integrity of decrypted V2 opaque access tokens. By truncating a valid token to approximately 80 characters, an attacker can bypass integrity checks, as the system validates the session identifier but ignores the missing user ID suffix. Fixed in versions 3.4.7 and 4.11.0.

A logical integrity vulnerability exists in ZITADEL's handling of V2 opaque access tokens. Due to insufficient validation of the decrypted token payload, the system accepts truncated tokens that lack the required user identity suffix. This flaw allows modified authentication artifacts to pass verification checks, violating the integrity of the authorization mechanism.

Vulnerability Overview

ZITADEL, an open-source identity management platform, utilizes opaque access tokens for user authorization. In affected versions, a vulnerability exists in the validation logic for "V2" format tokens. These tokens are encrypted strings that, when decrypted, contain a composite structure: a token identifier (session reference) and a user identifier. The vulnerability arises from the system's failure to enforce strict integrity checks on the entire decrypted payload.

The specific flaw allows a token to be truncated—stripping the user identifier portion of the payload—while remaining valid in the eyes of the verification logic. Because the system successfully extracts the token identifier from the prefix and retrieves the corresponding session from the database, it erroneously assumes the token is valid without verifying that the token's embedded user identity matches the database record. This represents a violation of CWE-302 (Authentication Bypass by Assumed-Immutable Data).

Root Cause Analysis

The root cause lies in the implementation of the verifyAccessTokenV2 function within the event sourcing repository. ZITADEL V2 tokens encapsulate two pieces of data in their decrypted plaintext: a token_id (formatted as v2_<oidc_session>...) and a user_id.

When a request is received, the system performs the following steps:

  1. Decrypts the opaque token string.
  2. Parses the token_id from the beginning of the plaintext.
  3. Queries the database using this token_id to retrieve the active session and associated metadata (including the authoritative user_id).

In vulnerable versions, the verification logic stopped there. It implicitly trusted that if the token_id existed and was active in the database, the token was valid. It failed to compare the user_id present in the token's tail against the user_id retrieved from the database. Consequently, if a token was truncated such that the token_id remained intact but the user_id was removed, the system processed the request as authenticated, ignoring the data discrepancy.

Code Analysis

The vulnerability exists in internal/authz/repository/eventsourcing/eventstore/token_verifier.go. The fix introduces a mandatory parity check between the token's claim and the database's record.

Below is the logic flow before and after the patch:

// VULNERABLE LOGIC (Conceptual)
// The system retrieves the token object based on the ID found in the input string.
activeToken, err := repo.eventstore.GetToken(ctx, tokenID)
if err != nil {
    return error
}
// The function returns success here without checking if the input 'subject' (userID from token)
// actually matches 'activeToken.UserID' (userID from DB).
return activeToken.UserID, nil

The patch enforces strict equality. If the decrypted subject does not match the database record, the token is rejected as invalid or tampered with.

// PATCHED LOGIC in verifyAccessTokenV2
func (repo *TokenVerifierRepo) verifyAccessTokenV2(ctx context.Context, token, subject, ...) {
    // ... [Retrieval of activeToken from database] ...
 
    // CRITICAL FIX: Verify the subject (decrypted UserID) matches the DB record.
    // If the token was truncated, 'subject' would be empty or malformed.
    if activeToken.UserID != subject {
        // Explicitly reject the request if the identities do not align
        return "", "", "", "", "", zerrors.ThrowUnauthenticated(nil, "APP-3f4fs", "invalid token")
    }
 
    // ... [Continue with expiration checks] ...
}

Exploitation and Attack Vector

The exploitation of this vulnerability is trivial but requires access to a valid V2 token. The attack vector is network-based and involves token malleability.

Attack Workflow

  1. Acquisition: The attacker obtains a valid V2 opaque access token (e.g., via a standard OIDC login flow).
  2. Modification: The attacker truncates the token string to approximately 80 characters. This length is sufficient to retain the encrypted token_id prefix but discards the suffix containing the user_id.
  3. Submission: The attacker submits this truncated token in the Authorization: Bearer <token> header of an API request.

Outcome

The ZITADEL backend decrypts the partial ciphertext (or processes the prefix depending on the encryption mode specifics), successfully extracts the session ID, and validates the request. The server responds with 200 OK despite the token being structurally corrupt. While this does not inherently allow an attacker to generate tokens for other users (as the token_id contains high-entropy random values), it degrades the integrity of the authentication protocol by allowing malformed credentials to be accepted.

Impact Assessment

The severity of this vulnerability is classified as Medium (CVSS 4.3). The impact is primarily on the integrity of the authentication mechanism rather than direct confidentiality or availability loss.

  • Integrity Violation: The core issue is the system's willingness to accept modified data. In a strict security model, any alteration to a credential must result in immediate rejection.
  • Limited Privilege Escalation: The vulnerability does not allow an attacker to forge a session for an arbitrary user, as they would still need to guess a valid 128-bit (or larger) token_id which acts as the database key. The attack is limited to modifying existing valid tokens.
  • Scope: This affects all deployments using V2 opaque tokens in ZITADEL versions prior to 3.4.7 and 4.11.0.

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

  • Attack Vector: Network (N)
  • Privileges Required: None (N) - theoretically, though possession of a token is needed.
  • Integrity: Low (L) - Modification of data is possible, but control over the scope is limited.

Mitigation Strategies

Remediation requires updating the ZITADEL instance to a patched version that includes the logic to cross-verify the token subject against the database record.

Official Patches

  • v3.x Branch: Upgrade to ZITADEL v3.4.7 or later.
  • v4.x Branch: Upgrade to ZITADEL v4.11.0 or later.

Deployment Changes

No configuration changes are required after the upgrade. The fix is internal to the TokenVerifierRepo logic. Existing tokens remain valid; however, any truncated tokens cached or stored by malicious actors will immediately cease to function, resulting in Unauthenticated errors (APP-3f4fs).

Detection

Security teams can identify exploitation attempts by analyzing application logs for specific error patterns post-patch. Look for increased occurrences of the error ID APP-3f4fs with the message "invalid token," which indicates that a token's decrypted subject did not match the associated session owner.

Official Patches

ZITADELRelease v3.4.7 fixing the vulnerability
ZITADELRelease v4.11.0 fixing the vulnerability

Fix Analysis (1)

Technical Appendix

CVSS Score
4.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
EPSS Probability
0.01%
Top 97% most exploited

Affected Systems

ZITADEL Identity Management Platform

Affected Versions Detail

Product
Affected Versions
Fixed Version
ZITADEL
ZITADEL
>= 3.0.0, < 3.4.73.4.7
ZITADEL
ZITADEL
>= 4.0.0, < 4.11.04.11.0
AttributeDetail
CWECWE-302
CVSS v3.14.3 (Medium)
Attack VectorNetwork
ImpactIntegrity Loss
Exploit StatusPoC Available
EPSS Score0.015%

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Credential Access
T1212Exploitation for Credential Access
Credential Access
CWE-302
Authentication Bypass by Assumed-Immutable Data

Authentication Bypass by Assumed-Immutable Data

Known Exploits & Detection

ZITADEL Security AdvisoryProof of concept involves truncating the opaque access token to 80 characters.

Vulnerability Timeline

Fix committed to GitHub
2026-02-16
Public disclosure and GHSA publication
2026-02-26

References & Sources

  • [1]GHSA-6mq3-xmgp-pjm5
  • [2]NVD CVE-2026-27840

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•4 days ago•CVE-2026-9354
6.9

CVE-2026-9354: Arbitrary Mass Mention Bypass in NousResearch hermes-agent Slack and Mattermost Adapters

A vulnerability in the Slack and Mattermost platform adapters for NousResearch hermes-agent permits an unauthenticated remote attacker to execute arbitrary mass mentions. By leveraging prompt injection, an attacker can bypass output sanitization logic and trigger workspace-wide notification exhaustion.

Alon Barad
Alon Barad
30 views•6 min read
•4 days ago•CVE-2026-9306
6.3

CVE-2026-9306: Unauthenticated Insecure Direct Object Reference (IDOR) in QuantumNous new-api Midjourney Relay

CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.

Amit Schendel
Amit Schendel
13 views•5 min read
•5 days ago•GHSA-GGXF-37HM-9WQF
6.5

GHSA-GGXF-37HM-9WQF: Session Leakage via Unsafe Challenge Path Parsing in instagrapi

The instagrapi library prior to version 2.6.9 contains an improper input validation vulnerability within its challenge handling mechanism. Maliciously crafted server responses can manipulate the client into forwarding session cookies and credentials to an external attacker-controlled domain.

Amit Schendel
Amit Schendel
20 views•6 min read
•5 days ago•GHSA-QQQM-5547-774X
9.1

GHSA-QQQM-5547-774X: Unauthenticated Path Traversal in FileBrowser Quantum PATCH Handler

GHSA-QQQM-5547-774X is a critical path traversal vulnerability in the FileBrowser Quantum application, specifically within the Go backend package. The vulnerability resides in the HTTP handler responsible for processing bulk file modifications via the public API. Unauthenticated attackers can exploit an order-of-operations flaw in the path sanitization logic to bypass intended directory restrictions. This allows adversaries to arbitrarily read, move, and overwrite files on the underlying filesystem by supplying specially crafted HTTP PATCH requests.

Alon Barad
Alon Barad
5 views•6 min read
•5 days ago•CVE-2026-8723
5.3

CVE-2026-8723: Synchronous Denial of Service in qs npm Package via TypeError

The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.

Amit Schendel
Amit Schendel
35 views•7 min read
•5 days ago•GHSA-7M8F-HGJQ-8GC9
7.5

GHSA-7M8F-HGJQ-8GC9: Pre-Authentication Denial of Service via Insecure Deserialization Order in aiosend

The aiosend library prior to version 3.0.6 contains a pre-authentication Denial of Service (DoS) vulnerability in its webhook handling mechanism. The software processes and deserializes incoming JSON payloads before verifying the cryptographic signature, allowing unauthenticated attackers to exhaust server CPU and memory resources by sending large, complex payloads.

Amit Schendel
Amit Schendel
3 views•6 min read