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·46 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

•2 days ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
11 views•10 min read
•2 days ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
14 views•12 min read
•2 days ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•2 days ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
16 views•10 min read
•2 days ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
19 views•10 min read
•2 days ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read