upatch.dev

CVE-2026-78162

Apache Camel: Camel-Hazelcast Managed Instances Missing Java Deserialization Filter (Incomplete Fix for CVE-2026-43865)

Refuses subprocess execution from the Apache Camel camel-hazelcast JVM to mitigate CVE-2026-78162.

Critical 10.0Vetted

EPSS 1.1%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.

At a glance

CVE-2026-78162 is a critical (CVSS 10.0) vulnerability in Apache Camel, published 19 October 2026. A vetted upatch, cve-2026-78162-exec-block, blocks it on running Linux machines with shirudo until Apache Camel is upgraded.

Severity
Critical 10.0 CVSS 4.0
Chance of exploitation
1.1% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-502
Affected software
Apache Camel (Apache Software Foundation)
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-78162, "Camel-Hazelcast: Incomplete fix for CVE-2026-43865 leaves managed instances without a Java deserialization filter, enabling remote code execution", was published on 19 October 2026. The fix for CVE-2026-43865 introduced HazelcastSerializationFilterHelper.applyDefault(Config) to attach a default JavaSerializationFilterConfig to Hazelcast instances created by camel-hazelcast, but missed two configuration paths: ReplicatedHazelcastAggregationRepository.doStart(), which overrides HazelcastAggregationRepository.doStart() without calling super.doStart() (CAMEL-24413), and HazelcastDefaultComponent.getOrCreateHzClientInstance(), which builds an unfiltered ClientConfig via XmlClientConfigBuilder when hazelcastMode=client is used without an explicit ClientConfig or hazelcastConfigUri (CAMEL-24420). An attacker who can publish to the Hazelcast cluster can send a crafted serialized Java object that Hazelcast deserializes before Camel processes the exchange, leading to remote code execution.

Official description

Deserialization of Untrusted Data vulnerability in Apache Camel. This issue affects Apache Camel: from 4.0.0 before 4.18.5, from 4.19.0 before 4.22.1. The camel-hazelcast component applies a default Hazelcast JavaSerializationFilterConfig to the instances it creates from its own configuration, a protection introduced by CVE-2026-43865. That change did not reach two of the configuration paths Camel builds itself, so those paths continued to create Hazelcast instances whose Java deserialization is unrestricted. ReplicatedHazelcastAggregationRepository extends HazelcastAggregationRepository but overrides doStart() without calling super.doStart(), keeping its own copy of the bootstrap block, and therefore never received the filter: a route using it without supplying a hazelcastInstance starts a Hazelcast member that deserializes values read from the backing ReplicatedMap with no class restriction. HazelcastDefaultComponent#getOrCreateHzClientInstance() builds its own ClientConfig when hazelcastMode=client is selected and neither a referenced ClientConfig nor hazelcastConfigUri is supplied, and likewise applied no filter, so client-mode endpoints behaved differently from node-mode endpoints for an otherwise identical configuration. In both cases an attacker able to publish into the Hazelcast cluster that the affected instance is attached to can cause a serialized Java object of their choosing to be deserialized inside Hazelcast's own serialization layer, before Camel processes the exchange, resulting in remote code execution. Hazelcast clusters have neither authentication nor TLS enabled by default. Selecting client mode is a topology choice rather than a security option, so neither path required the deployment to opt in to unsafe behaviour. Users are recommended to upgrade to version 4.23.0, which fixes the issue. If users are on the 4.22.x releases stream, then they are suggested to upgrade to 4.22.1. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.5. The 4.14.x releases stream and earlier reached end of life before this issue was resolved and will not receive a fix, so deployments on those lines must move to a supported release. For deployments that cannot upgrade immediately, supply an explicit Hazelcast configuration carrying a JavaSerializationFilterConfig, or inject a pre-built HazelcastInstance, since a user-supplied configuration is never overwritten by Camel. Alternatively set the JVM-wide filter -Djdk.serialFilter=!java.net.;java.;javax.;org.apache.camel.;!* and enable Hazelcast cluster authentication and TLS to restrict who can reach the cluster.

Affected versions

Apache Camel camel-hazelcast:

Branch Affected Fixed in
4.18.x 4.0.0 to 4.18.4 4.18.5
4.22.x 4.19.0 to 4.22.0 4.22.1
mainline 4.19.0 to 4.22.0 4.23.0

Kernels: any Linux kernel supported by shirudo with BTF and BPF LSM enabled.

Sources

More references from NVD (8)

Mitigation

A BPF LSM program attached to lsm/bprm_check_security inspects the current task and its real_parent. When either task's executable (mm->exe_file) is named java and the first 256 bytes of its user command line (mm->arg_start to mm->arg_end) contain camel-hazelcast, the hook increments key 0 of the refused per-CPU array map and returns -EPERM. Checking both current and real_parent covers both direct execve() after fork() and the OpenJDK jspawnhelper helper path. Any refusal returned by an earlier BPF LSM program on the same hook is preserved.

Side effects

  • A java process whose command-line arguments include camel-hazelcast inside the first 256 bytes cannot execute external programs (Runtime.exec(), ProcessBuilder).
  • Normal in-JVM Camel routing, aggregation in ReplicatedHazelcastAggregationRepository, and Hazelcast cluster and client operations continue unaffected.
  • Other processes on the machine, including other java processes that do not carry camel-hazelcast in their initial command-line arguments, are unaffected.
  • Not covered: a JVM whose classpath uses wildcard expansion or an argument file (@argfile) so camel-hazelcast does not appear in the first 256 bytes of mm->arg_start, or in-memory post-deserialization effects that do not execute a new program.

Preemption model and cost

The program is written for preemptible RCU (PREEMPT_DYNAMIC, PREEMPT_LAZY and PREEMPT_RT included). Refusals are counted in a per-CPU array map using an atomic fetch-and-add (__sync_fetch_and_add), which is safe when two runs interleave on the same CPU. The hook runs only on execve(), never on I/O or network paths, and returns immediately after checking the executable dentry name (d_name.len == 4 and "java") for non-Java processes.

The policy

99 lines of BPF C, attached at lsm/bprm_check_security.

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>

#define EPERM	1

char _license[] SEC("license") = "Dual BSD/GPL";

struct {
	__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
	__uint(max_entries, 1);
	__type(key, __u32);
	__type(value, __u64);
} refused SEC(".maps");

static __always_inline void count_refused(void)
{
	__u32 key = 0;
	__u64 *value = bpf_map_lookup_elem(&refused, &key);

	if (value)
		__sync_fetch_and_add(value, 1);
}

static __always_inline bool name_is_java(const struct dentry *dentry)
{
	const unsigned char *name = BPF_CORE_READ(dentry, d_name.name);
	char buf[8] = {};

	if (!dentry || BPF_CORE_READ(dentry, d_name.len) != 4)
		return false;
	if (bpf_probe_read_kernel_str(buf, sizeof(buf), name) < 0)
		return false;
	return buf[0] == 'j' && buf[1] == 'a' && buf[2] == 'v' &&
	       buf[3] == 'a';
}

static __always_inline bool has_camel_hazelcast_cmdline(struct task_struct *task)
{
	unsigned long start = BPF_CORE_READ(task, mm, arg_start);
	unsigned long end = BPF_CORE_READ(task, mm, arg_end);
	unsigned long len;
	char buf[256] = {};

	if (!start || end <= start)
		return false;
	len = end - start;
	if (len > sizeof(buf))
		len = sizeof(buf);
	if (bpf_probe_read_user(buf, (__u32)len, (const void *)start))
		return false;
	for (__u32 i = 0; i <= sizeof(buf) - 15; i++) {
		if (buf[i] == 'c' && buf[i + 1] == 'a' && buf[i + 2] == 'm' &&
		    buf[i + 3] == 'e' && buf[i + 4] == 'l' &&
		    buf[i + 5] == '-' && buf[i + 6] == 'h' &&
		    buf[i + 7] == 'a' && buf[i + 8] == 'z' &&
		    buf[i + 9] == 'e' && buf[i + 10] == 'l' &&
		    buf[i + 11] == 'c' && buf[i + 12] == 'a' &&
		    buf[i + 13] == 's' && buf[i + 14] == 't')
			return true;
	}
	return false;
}

static __always_inline bool is_camel_hazelcast_task(struct task_struct *task)
{
	const struct dentry *exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);

	if (!name_is_java(exe))
		return false;
	return has_camel_hazelcast_cmdline(task);
}

static __always_inline int earlier_verdict(int ret)
{
	return ret >= -4095 && ret < 0 ? ret : -EPERM;
}

SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_78162_exec_block, struct linux_binprm *bprm, int ret)
{
	struct task_struct *task;
	struct task_struct *parent;

	if (ret)
		return earlier_verdict(ret);
	task = bpf_get_current_task_btf();
	if (!is_camel_hazelcast_task(task)) {
		parent = BPF_CORE_READ(task, real_parent);
		if (!parent || !is_camel_hazelcast_task(parent))
			return 0;
	}
	count_refused();
	return -EPERM;
}

Process

How this upatch was written, checked and reviewed, from the registry’s history.

  1. 19 Oct 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #20 openedAdd CVE-2026-78162: Refuses subprocess execution from the Apache Camel camel-hazelcast JVMromanlab
  3. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
  4. 25 Nov 2026MergeMerged #20romanlab

No human review is recorded on GitHub for this upatch yet.

Evidence

On Apache Camel 4.22.0 with camel-hazelcast and ReplicatedHazelcastAggregationRepository, the loaded upatch refused subprocess execution from the vulnerable JVM while normal Camel and Hazelcast operations continued.

Tested
25 Nov 2026
Target
Apache Camel camel-hazelcast 4.22.0 with Hazelcast 5.4.0 (ReplicatedHazelcastAggregationRepository default Config without JavaSerializationFilterConfig), loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Distribution
Ubuntu 26.04
Results
StateSubprocess execution from camel-hazelcast JVM blockedUnfiltered ReplicatedHazelcastAggregationRepository active
Before loadingno (reached)yes
Upatch loadedyes (blocked)yes
After unloadingno (reached)yes
tools-test.log Output of tools/test --setup showing reached before, blocked while loaded, and reached after unloading.
tools/test --setup, 2026-11-25T10:59:34Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-78162
  setup   done         CAMEL_PROBE_URL=http://127.0.0.1:18080/probe
  before  reached      the vulnerable camel-hazelcast JVM started /bin/true from an unfiltered ReplicatedHazelcastAggregationRepository
  loaded  blocked      the upatch refused subprocess execution from the camel-hazelcast JVM
  after   reached      the vulnerable camel-hazelcast JVM started /bin/true from an unfiltered ReplicatedHazelcastAggregationRepository
  PASS: reached before, blocked while loaded, reached again after

Use it

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-78162
Publish and roll out
shirudo bpm push build/packages/cve-2026-78162-1.0.0.bee oci://<registry>/<namespace>/cve-2026-78162 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-78162-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>