# CVE-2026-34486

## Summary

Apache Tomcat EncryptInterceptor Bypass via CVE-2026-29146 Fix Error - Missing Encryption of Sensitive Data

## Description

CVE-2026-34486 is a Missing Encryption of Sensitive Data vulnerability in Apache Tomcat's EncryptInterceptor that allows an attacker to bypass encryption entirely. The vulnerability was inadvertently introduced by an error in the fix for CVE-2026-29146 (padding oracle vulnerability), where a code refactoring error moved the `messageReceived()` call outside the exception handling block. This means if decryption fails, the encrypted (or malformed) message is still processed as if it were legitimate.\n\n**Root Cause Analysis:**\nThe vulnerability stems from a refactoring error in the CVE-2026-29146 fix. In the vulnerable code (versions 11.0.20, 10.1.53, 9.0.116), the `super.messageReceived(msg)` call was placed OUTSIDE the try-catch block handling decryption.\n\n```java\npublic void messageReceived(ChannelMessage msg) {\n    try {\n        // Decryption logic\n        xbb.clear();\n        xbb.append(data, 0, data.length);\n    } catch (GeneralSecurityException gse) {\n        log.error(sm.getString("encryptInterceptor.decrypt.failed"), gse);\n    }\n    super.messageReceived(msg);  // BUG: Outside try - executes regardless!\n}\n```\n\nWhen `super.messageReceived(msg)` is outside the try-catch, it executes regardless of whether decryption succeeded. If decryption fails (throws GeneralSecurityException), the exception is logged but the unprocessed (encrypted/corrupted) message still passes down the interceptor chain, allowing message processing without proper decryption.\n\n**Attack Flow:**\n1. EncryptInterceptor receives an encrypted cluster message\n2. Decryption fails (malformed/corrupted data triggers GeneralSecurityException)\n3. Exception is caught and logged but ignored\n4. Message (still encrypted/corrupted) continues to downstream components\n5. Downstream components process the message without proper decryption\n\n**Target Setup for Reproduction:**\n- Apache Tomcat 9.0.116, 10.1.53, or 11.0.20\n- Configure clustering with EncryptInterceptor in server.xml\n- Enable session replication between multiple Tomcat nodes\n\n**Example vulnerable configuration:**\n```xml\n\u003cCluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"\u003e\n    \u003cChannel className="org.apache.catalina.tribes.group.GroupChannel"\u003e\n        \u003cMembership className="org.apache.catalina.tribes.membership.McastService"\u003e\n        \u003cReceiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"\u003e\n        \u003cInterceptors\u003e\n            \u003cInterceptor className="org.apache.catalina.tribes.group.interceptors.EncryptInterceptor"\n                encryptionKey="a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"\n                encryptionAlgorithm="AES/CBC/PKCS5Padding"\u003e\n        \u003c/Interceptors\u003e\n    \u003c/Channel\u003e\n\u003c/Cluster\u003e\n```\n\n**Expected exploitation outcome:**\n- Send malformed encrypted messages to the cluster\n- Observe log entries: "Failed to decrypt message"\n- Message is still processed despite decryption failure\n- Session data may be exposed or corrupted\n\n**The Fix:**\nMove `super.messageReceived(msg)` inside the try block so it only executes on successful decryption.\n\n**CVSS Details:**\n- Score: 7.5 (HIGH)\n- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N\n- Network attack vector, low complexity, no privileges required, high impact on confidentiality

## Metadata

- Product: Apache Tomcat
- Severity: high
- Status: open
