Camel Spring Redis deserialization RCE (CVE-2026-78165) [PoC]
CVE-2026-78165
CVE-2026-78165: Apache Camel Spring Redis deserializes untrusted data, letting any Redis publisher run code (CVSS 8.8). Update to 4.23.0, 4.22.1 or 4.18.5.
Exploitation confirmed - public proof-of-concept - CVE-2026-78165 is a high-severity deserialization flaw in Apache Camel Spring Redis (2.11.0 before 4.18.5, and 4.19.0 before 4.22.1) that lets anyone able to publish to a subscribed Redis channel execute arbitrary code on the Camel host. Fixed in 4.23.0, with backports in 4.22.1 and 4.18.5.
Overview
The Spring Redis component ships with a default Java serializer. When no serializer option is configured, RedisConfiguration.getSerializer builds a bare JdkSerializationRedisSerializer and reuses that single instance for every read. Spring’s implementation hands the bytes to DefaultDeserializer, which reads them through a ConfigurableObjectInputStream with no java.io.ObjectInputFilter attached. Any serialized class graph is therefore instantiated and its readObject method runs.
Two paths reach that sink:
- Consumer path.
RedisConsumer.setBodydeserializes the raw bytes of every message delivered on subscribed channels, before the Exchange exists, so route logic never gets a chance to inspect the payload. Anyone who can issuePUBLISHon a subscribed channel reaches the sink directly. - Template path. The default
RedisTemplatebuilt byRedisConfiguration.createDefaultTemplateshares the same serializer, so producer commandsGET,HGET,HGETALLandHVALSdeserialize whatever sits in the keyspace.SpringRedisIdempotentRepositoryuses that template as well.
Wiring a custom redisTemplate with a String serializer does not close the consumer path, because setBody reads getSerializer directly rather than the template’s serializer. Deployments in that shape stay exposed until the serializer option itself is set.
Impact
Successful exploitation runs attacker-supplied code in the Camel process, with the privileges of that process. No authentication is required beyond the ability to publish or write to Redis. An internal foothold, a misconfigured or unauthenticated Redis instance, or a shared channel namespace is enough. A public proof-of-concept exists; CISA KEV does not list the CVE, so no confirmed in-the-wild use has been reported.
Remediation
Upgrade to 4.23.0. On the 4.22.x line use 4.22.1; on 4.18.x use 4.18.5. The 4.14.x line and earlier are end of life and will not be fixed, so those deployments must move to a supported release.
If you cannot upgrade immediately:
- Set the JVM-wide
jdk.serialFiltersystem property, for example-Djdk.serialFilter=!java.net.**;java.**;javax.**;org.apache.camel.**;!*. - Set the
serializerendpoint option to a serializer that avoids Java serialization, such asStringRedisSerializer. Setting it on a custom template alone is not sufficient. - Require authentication on Redis, restrict which clients may publish to subscribed channels, and keep the instance off untrusted networks.
The related ActiveMQ KEV entry shows how quickly messaging middleware exposure becomes a priority.
Security Insight
This bug sat undetected since 2.11.0 because the component never constructs a java.io.ObjectInputStream itself, so static sweeps for unfiltered Java deserialization in Camel never flagged it. That is the real lesson: the dangerous gadget lives one abstraction layer down, inside Spring’s converter chain, and reviewer heuristics that grep for direct stream construction will keep missing it. Treat “we audited our deserialization sinks” claims with suspicion until the transitive serializers are on the list too.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| oscerd/CVE-2026-78165 Reproducer for CVE-2026-78165 (Apache Camel camel-spring-redis): default JdkSerializationRedisSerializer deserializes Redis PUBLISH payloads with no ObjectInputFilter (RCE) — Camel Spring Boot + Camel | ★ 0 |
Showing 1 of 1 known references. Source: nomi-sec/PoC-in-GitHub.
Related Advisories
Deserialization of untrusted data in Microsoft Office SharePoint allows an authorized attacker to execute code over a network....
The WP Mail Logging plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 1.15.0 via deserialization of untrusted input from the email log message field. Thi...
Deserialization of untrusted data in Microsoft Entra ID allows an unauthorized attacker to execute code over a network....
Deserialization of untrusted data in Microsoft Office SharePoint allows an unauthorized attacker to execute code over a network....