Skip to main content
Vulnerability Database/CVE-2026-78165

CVE-2026-78165: Apache Camel Redis Deserialization Vulnerability

CVE-2026-78165 is a deserialization of untrusted data flaw in Apache Camel Spring Redis that allows remote code execution through malicious serialized objects. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-78165 Overview

CVE-2026-78165 is a deserialization of untrusted data vulnerability [CWE-502] in the Apache Camel Spring Redis component. The component lazily built a default JdkSerializationRedisSerializer when no serializer option was configured. That serializer deserialized the raw bytes of every message published on subscribed Redis channels and every value read by producer commands such as GET, HGET, HGETALL, and HVALS. An attacker who can publish to a subscribed channel or write to a consumed key reaches the deserialization sink before any route logic runs. The flaw affects Apache Camel from 2.11.0 before 4.18.5 and from 4.19.0 before 4.22.1.

Critical Impact

Attackers with Redis publish or write access can trigger arbitrary Java deserialization in Camel consumers and producers, enabling remote code execution on the host JVM.

Affected Products

  • Apache Camel versions 2.11.0 through 4.18.4
  • Apache Camel versions 4.19.0 through 4.22.0
  • camel-spring-redis component and SpringRedisIdempotentRepository consumers

Discovery Timeline

  • 2026-10-19 - CVE-2026-78165 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-78165

Vulnerability Analysis

The root issue lives in RedisConfiguration.getSerializer. When no serializer option is configured, the method lazily constructs a bare JdkSerializationRedisSerializer. Spring's implementation delegates through DeserializingConverter to DefaultDeserializer, which reads bytes with a ConfigurableObjectInputStream and installs no java.io.ObjectInputFilter. The stream materialises arbitrary serialized class graphs and executes their readObject methods.

RedisConsumer.setBody applies this serializer to the raw bytes of every message published to subscribed channels. Deserialization occurs before the Camel Exchange is constructed, so no route logic can inspect or reject the payload. Any actor able to issue PUBLISH on a subscribed channel reaches the sink directly.

The same default serializer backs the RedisTemplate built by RedisConfiguration.createDefaultTemplate. Producer read commands including GET, HGET, HGETALL, and HVALS deserialize whatever is stored in the Redis keyspace. SpringRedisIdempotentRepository shares that template and inherits the exposure.

Root Cause

Configuring a custom redisTemplate does not close the consumer path. RedisConsumer.setBody reads getSerializer directly rather than the serializer attached to the template. Deployments that wired a StringRedisSerializer into their own template remained exposed on the consumer side unless they also set the serializer endpoint option. The component never constructed a java.io.ObjectInputStream itself, which is why prior Camel codebase audits for unfiltered Java deserialization did not reach it.

Attack Vector

An attacker with network access to the Redis instance and the ability to PUBLISH on a subscribed channel sends a crafted serialized object graph. The Camel consumer deserializes the payload and invokes attacker-controlled readObject logic in the JVM. Attackers who can write to monitored Redis keys achieve the same effect through producer read operations.

The vulnerability dates to the initial release of the component in Camel 2.11.0. See the Apache Camel CVE-2026-78165 Advisory for technical details.

Detection Methods for CVE-2026-78165

Indicators of Compromise

  • Unexpected child processes spawned by Camel JVMs that integrate with Redis, especially shells or scripting interpreters
  • Redis PUBLISH traffic from untrusted sources on channels consumed by Camel routes
  • java.io.InvalidClassException or ClassNotFoundException entries in Camel logs referencing gadget chain classes
  • Outbound connections from Camel hosts to attacker-controlled infrastructure immediately after Redis message receipt

Detection Strategies

  • Inspect Camel deployments for camel-spring-redis endpoints lacking an explicit serializer option
  • Audit RedisConfiguration usage for reliance on the default JdkSerializationRedisSerializer
  • Correlate Redis authentication logs with Camel consumer activity to identify unexpected publishers
  • Monitor JVM runtime behavior for reflective class loading triggered by inbound Redis messages

Monitoring Recommendations

  • Enable JVM serialization filter logging via -Djdk.serialFilterTrace to surface unexpected class graphs
  • Capture process execution telemetry on Camel hosts and alert on non-standard child processes
  • Log Redis AUTH, SUBSCRIBE, and PUBLISH operations and route them to a central analytics tier for anomaly detection
  • Track outbound network connections from Camel JVM processes to flag post-exploitation activity

How to Mitigate CVE-2026-78165

Immediate Actions Required

  • Upgrade to Apache Camel 4.23.0, 4.22.1, or 4.18.5 depending on the release stream in use
  • Set the serializer endpoint option to StringRedisSerializer or another non-Java serializer on every camel-spring-redis endpoint
  • Apply the JVM-wide jdk.serialFilter system property to constrain deserializable classes until patching completes
  • Enable Redis authentication and restrict PUBLISH rights to trusted clients only

Patch Information

Users on supported release lines should upgrade to Apache Camel 4.23.0, which fixes the issue. Deployments on the 4.22.x stream should upgrade to 4.22.1, and 4.18.x deployments should upgrade to 4.18.5. The 4.14.x and earlier streams reached end of life before this issue was resolved and will not receive a fix. Those deployments must move to a supported release. Patch details are available in Apache Camel Pull Request #25587 and Apache JIRA Issue CAMEL-24421.

Workarounds

  • Set -Djdk.serialFilter=!java.net.**;java.**;javax.**;org.apache.camel.**;!* on the JVM running Camel to block dangerous class graphs
  • Configure the serializer endpoint option explicitly, noting that setting it on a custom redisTemplate alone is insufficient because RedisConsumer.setBody reads getSerializer directly
  • Require authentication on the Redis instance and restrict which clients may publish to subscribed channels
  • Isolate Redis instances consumed by Camel from untrusted networks as defence in depth
bash
# Configuration example
java -Djdk.serialFilter='!java.net.**;java.**;javax.**;org.apache.camel.**;!*' \
     -jar camel-application.jar

# Camel endpoint URI with safe serializer
# spring-redis://host:6379?serializer=#stringRedisSerializer

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.