← Security advisories
Apache Camel security advisory

CVE-2026-85246

Camel-Mina: information disclosure - the consumer wrote the route's exception straight back over the socket, handing the remote peer its class and message over a textline codec and its serialised form over the object codec

Description

When processing of an exchange failed, the Mina consumer wrote exchange.getException() straight back over the socket to the remote peer. Over a textline codec that hands the peer the exception's class name and message; over the object codec it hands over the serialised exception, cause chain included. A remote peer able to provoke a failure could therefore read internal detail about the deployment - class and package names, and whatever a message or nested cause happens to carry, which in practice can include paths, host names and connection detail. The consumer had no option to suppress this, unlike the HTTP-family consumers aligned by CAMEL-23651.

Mitigation

Upgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.18.x LTS releases stream should upgrade to 4.18.5. Users on the 4.22.x LTS releases stream should upgrade to 4.22.1. A muteException consumer option, defaulting to true, replaces the route exception with a generic one carrying no class name, message or stack trace, while still writing a reply so that a synchronous peer is not left to time out. Set muteException=false to restore the previous behaviour. For deployments that cannot upgrade immediately, add an onException handler that sets the reply body explicitly, so the framework never writes the exception back to the peer.

Credit

This issue was discovered by Claude Security Scan Tool

Notes

The JIRA ticket: https://issues.apache.org/jira/browse/CAMEL-24476 refers to the various commits that resolved the issue, and has more details.

The fix was merged on main in https://github.com/apache/camel/pull/25741 (commit 7af3e74d8448b5f1c6620bbae44d766e3f440704), backported to camel-4.22.x in https://github.com/apache/camel/pull/25934 (commit 9a6e8222085ed12f73ce76f826aeb69e9d111ff8) and to camel-4.18.x in https://github.com/apache/camel/pull/25935 (commit e6986906e41b3e537d3a5d278525bc09b78b4127).

The issue is classified as CWE-209 Generation of Error Message Containing Sensitive Information. The camel-4.14.x line reached end of life before this fix and does not receive it; deployments on 4.14.x should move to 4.18.5 or later.

References