Unfiltered Spring Redis payloads enable remote code execution
High (8.8)Published
CVE-2026-78165 lets an attacker execute code through unfiltered Java deserialization of Redis payloads in Apache Camel's Spring Redis component.
- Affected
- Apache Camel Spring Redis 2.11.0–4.18.4 and 4.19.0–4.22.0
- Attack requirements
- Ability to publish to a subscribed Redis channel or write Redis values read by a route using the default serializer
Impact
An attacker can execute code with the Camel process's privileges by supplying a crafted serialized object. Apache assigns a CVSS 3.1 score of 8.8.
Technical detail
- RedisConfiguration.getSerializer defaults to JdkSerializationRedisSerializer without an ObjectInputFilter.
- RedisConsumer.setBody deserializes published bytes before constructing the Exchange, so route-level message checks run too late.
- The default RedisTemplate and SpringRedisIdempotentRepository share the serializer, exposing producer reads including GET, HGET, HGETALL, and HVALS.
- A custom redisTemplate alone does not protect the consumer, which reads the serializer endpoint option directly.
Remediation
- Upgrade to Apache Camel 4.18.5, 4.22.1, or 4.23.0 and later on the corresponding release line; move unsupported releases to a supported line.
- Until upgrading, set the serializer endpoint option to a non-Java serializer such as StringRedisSerializer, or configure a restrictive JVM-wide jdk.serialFilter.
- On fixed releases, review the deserializationFilter option before allowing application classes outside the default filter.
- Require Redis authentication and restrict publishing, writes, and network access to trusted clients.