/

CVE-2026-78165

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in Camel Redis Component

CVE-2026-78165

Undergoing Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Apache Camel's Spring Redis component may deserialize untrusted Redis message and key-value data with Java's native serialization when no safer serializer is configured. An actor who can publish to a subscribed Redis channel or influence relevant Redis values may trigger arbitrary class instantiation and code execution before route logic can inspect the data.

Apache Camel's Spring Redis component may deserialize untrusted Redis message and key-value data with Java's native serialization when no safer serializer is configured. An actor who can publish to a subscribed Redis channel or influence relevant Redis values may trigger arbitrary class instantiation and code execution before route logic can inspect the data.

Affected context

The issue can occur in Apache Camel deployments using the Spring Redis component when the serializer option is left unset. In that configuration, consumer message bodies and certain Redis operations may use a lazily created JDK serialization serializer without an object input filter. A custom serializer configured only on a Redis template may not protect the consumer path if the endpoint-level serializer remains unchanged.

The issue can occur in Apache Camel deployments using the Spring Redis component when the serializer option is left unset. In that configuration, consumer message bodies and certain Redis operations may use a lazily created JDK serialization serializer without an object input filter. A custom serializer configured only on a Redis template may not protect the consumer path if the endpoint-level serializer remains unchanged.

Exploit preconditions

  • Attack surface: Redis channels and keyspace data consumed by the Camel Spring Redis component
  • Required access: Ability to publish messages to a subscribed channel or influence serialized values read by the component
  • Trigger point: Redis consumer message handling or Redis-backed reads such as GET, HGET, HGETALL, and HVALS
  • Why exploitation is possible: Untrusted bytes are passed to Java deserialization without a restrictive object input filter, allowing attacker-controlled class graphs to be materialized before route processing
  • Attack surface: Redis channels and keyspace data consumed by the Camel Spring Redis component
  • Required access: Ability to publish messages to a subscribed channel or influence serialized values read by the component
  • Trigger point: Redis consumer message handling or Redis-backed reads such as GET, HGET, HGETALL, and HVALS
  • Why exploitation is possible: Untrusted bytes are passed to Java deserialization without a restrictive object input filter, allowing attacker-controlled class graphs to be materialized before route processing

Why this happens

The component lazily selects a bare JDK serialization serializer when no explicit serializer is configured. Spring's deserialization path then reads attacker-influenced bytes through an object input stream without an appropriate java.io.ObjectInputFilter, allowing serialized classes and their deserialization callbacks to execute.

This behavior maps to CWE-502: Deserialization of Untrusted Data because external data is treated as a trusted serialized object graph rather than as constrained application data.

The component lazily selects a bare JDK serialization serializer when no explicit serializer is configured. Spring's deserialization path then reads attacker-influenced bytes through an object input stream without an appropriate java.io.ObjectInputFilter, allowing serialized classes and their deserialization callbacks to execute.

This behavior maps to CWE-502: Deserialization of Untrusted Data because external data is treated as a trusted serialized object graph rather than as constrained application data.

Potential impact

  • An attacker may execute code in the Camel process
  • The application process could be compromised
  • Route credentials, secrets, or connected services may be exposed
  • Redis-backed application state could be altered or poisoned
  • The host or surrounding services may be used for lateral movement
  • An attacker may execute code in the Camel process
  • The application process could be compromised
  • Route credentials, secrets, or connected services may be exposed
  • Redis-backed application state could be altered or poisoned
  • The host or surrounding services may be used for lateral movement

General mitigation guidance

Mitigation generally focuses on removing Java native serialization from Redis data paths and reducing trust in Redis-controlled input.

Common defensive patterns include:

  • Configure an endpoint-level serializer that uses a constrained data format, such as a string or explicitly allowlisted representation
  • Ensure consumer serializer settings are configured directly rather than relying only on a custom Redis template
  • Apply a restrictive JVM-wide serialization filter as defense in depth where Java serialization cannot yet be removed
  • Require Redis authentication and limit which clients can publish to subscribed channels
  • Keep Redis instances on protected networks and prevent exposure to untrusted clients
  • Run Camel with least-privilege operating-system, container, and service permissions
  • Prefer supported component releases that contain the security fix as part of normal dependency maintenance

Mitigation generally focuses on removing Java native serialization from Redis data paths and reducing trust in Redis-controlled input.

Common defensive patterns include:

  • Configure an endpoint-level serializer that uses a constrained data format, such as a string or explicitly allowlisted representation
  • Ensure consumer serializer settings are configured directly rather than relying only on a custom Redis template
  • Apply a restrictive JVM-wide serialization filter as defense in depth where Java serialization cannot yet be removed
  • Require Redis authentication and limit which clients can publish to subscribed channels
  • Keep Redis instances on protected networks and prevent exposure to untrusted clients
  • Run Camel with least-privilege operating-system, container, and service permissions
  • Prefer supported component releases that contain the security fix as part of normal dependency maintenance

How teams detect issues like this

Detection can include static analysis for default construction or use of JdkSerializationRedisSerializer, Java serialization APIs, and deserialization paths lacking object input filters. Code review should examine whether endpoint-level serializers are explicitly configured and whether custom Redis templates leave separate consumer paths unprotected.

Runtime monitoring can alert on unexpected Redis publishers, unusual channel activity, deserialization errors, and outbound behavior from Camel processes. CI policy checks may require approved serializers, restrictive serialization filters, authenticated Redis connections, and automated dependency security review.

Detection can include static analysis for default construction or use of JdkSerializationRedisSerializer, Java serialization APIs, and deserialization paths lacking object input filters. Code review should examine whether endpoint-level serializers are explicitly configured and whether custom Redis templates leave separate consumer paths unprotected.

Runtime monitoring can alert on unexpected Redis publishers, unusual channel activity, deserialization errors, and outbound behavior from Camel processes. CI policy checks may require approved serializers, restrictive serialization filters, authenticated Redis connections, and automated dependency security review.

Sources

SourceLink
camel.apache.orgcamel.apache.org/security/CVE-2026-78165.html
github.comgithub.com/apache/camel/pull/25587
github.comgithub.com/apache/camel/pull/25588
github.comgithub.com/apache/camel/pull/25589
github.comgithub.com/apache/camel/pull/25734
issues.apache.orgissues.apache.org/jira/browse/CAMEL-24421
github.comgithub.com/oscerd/CVE-2026-78165

Frequently asked

questions

It can be reached remotely when an attacker can access the relevant Redis service and publish to a channel consumed by Camel, or otherwise control data that the component reads. Network isolation and Redis access controls determine the practical exposure.

Not necessarily. The key requirement is access to the Redis channel or keyspace data used by the affected component. Redis authentication, authorization, and network restrictions can reduce that access.

Avoid Java native serialization for Redis message and value data, and configure a non-Java serializer directly on the Camel endpoint. Where native serialization remains unavoidable, apply a restrictive object input filter as defense in depth.

Treat all broker and cache data as untrusted, enforce approved serializer policies in code review and CI, configure filters centrally, and monitor which clients can publish to application-consumed Redis channels.

It can be reached remotely when an attacker can access the relevant Redis service and publish to a channel consumed by Camel, or otherwise control data that the component reads. Network isolation and Redis access controls determine the practical exposure.

Not necessarily. The key requirement is access to the Redis channel or keyspace data used by the affected component. Redis authentication, authorization, and network restrictions can reduce that access.

Avoid Java native serialization for Redis message and value data, and configure a non-Java serializer directly on the Camel endpoint. Where native serialization remains unavoidable, apply a restrictive object input filter as defense in depth.

Treat all broker and cache data as untrusted, enforce approved serializer policies in code review and CI, configure filters centrally, and monitor which clients can publish to application-consumed Redis channels.

Find out what's already
exploitable in your codebase.