Summary
Apache Camel's Hazelcast integration can create instances without the Java deserialization filter applied to other configuration paths. If an attacker can publish crafted serialized data to the Hazelcast cluster used by an affected instance, that data may be deserialized inside Hazelcast and lead to remote code execution.
Affected context
The issue affects Apache Camel versions from 4.0.0 before 4.18.5 and from 4.19.0 before 4.22.1. It occurs in two Camel-managed Hazelcast instance creation paths that did not apply a Java serialization filter:
- A
ReplicatedHazelcastAggregationRepositorystarts without a suppliedhazelcastInstance. - A Hazelcast client-mode endpoint is used without a referenced
ClientConfigorhazelcastConfigUri.
In either case, the created instance can deserialize cluster data without a class restriction. Hazelcast clusters may lack authentication and TLS unless these protections are configured.
Exploit preconditions
- Attack surface: The Hazelcast cluster to which the affected Camel instance is connected.
- Required access: Ability to publish serialized data to that cluster; authentication requirements depend on the deployment's cluster configuration.
- Trigger point: Hazelcast deserializes cluster data, potentially before Camel processes the exchange.
- Affected paths: The repository path without a supplied instance, or the client-mode path without a supplied client configuration or configuration URI.
- Why exploitation is possible: These Camel-managed instance creation paths omit the Java deserialization filter, allowing attacker-controlled serialized objects to be deserialized.
Why this happens
This is CWE-502: Deserialization of Untrusted Data. Camel applies a Hazelcast Java serialization filter in some instance creation paths, but two separately implemented bootstrap paths do not apply it. As a result, those instances can deserialize cluster-provided Java objects without a class restriction. The issue is an inconsistent security control, not an explicit choice by users to enable unsafe deserialization.
Potential impact
- An attacker who can publish data to the cluster could cause code to execute in the affected Hazelcast process.
- The affected Camel service or its host environment could be compromised.
- Accessible credentials, data, or services could be exposed or misused.
General mitigation guidance
Reduce the risk by ensuring Hazelcast instances use restrictive Java deserialization filters, including instances created through custom or component-managed paths. Prefer secure-by-default configurations and avoid deserializing data from untrusted cluster members; where feasible, use data formats that do not require Java object deserialization.
Restrict cluster access with authentication and TLS, and apply least privilege to the Camel process and its network access. Where a deployment supplies its own Hazelcast configuration or pre-built instance, ensure that it carries an appropriate serialization filter. JVM-wide deserialization policies can also provide a defense-in-depth control.
How teams detect issues like this
- Review code and configuration paths that create Hazelcast instances, including repository-specific startup methods and client-mode setup.
- Use static analysis or code review checks to identify Java deserialization paths without restrictive filters and duplicated bootstrap logic that may bypass shared security controls.
- Enforce policies requiring approved serialization filters and authenticated, encrypted cluster communications.
- Monitor Hazelcast membership and publishing activity for unexpected participants or unusual serialized-data traffic. Automated code review tools may help identify unsafe deserialization patterns.

