CVE-2026-27172
Insecure Deserialization in Apache Camel ConsulRegistry Enables RCE
Publication date: 2026-04-27
Last updated on: 2026-04-28
Assigner: Apache Software Foundation
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| apache | camel | From 3.0.0 (inc) to 4.14.6 (exc) |
| apache | camel | From 4.15.0 (inc) to 4.18.1 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-502 | The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The CVE-2026-27172 vulnerability affects the Apache Camel camel-consul component, specifically the ConsulRegistry class and its inner method ConsulRegistryUtils.deserialize. This vulnerability arises because the component reads Java-serialized values from the Consul key/value (KV) store and deserializes them using ObjectInputStream.readObject() without applying any ObjectInputFilter or class allowlist.
An attacker who can write malicious serialized Java objects to the Consul KV store can exploit this flaw to trigger arbitrary code execution when Camel performs a lookup against the registry. This unsafe deserialization happens during methods like ConsulRegistry.lookupByName and related lookup methods, which decode Base64-encoded serialized Java objects from the Consul KV store and deserialize them unsafely.
The vulnerability affects Apache Camel versions from 3.0.0 up to but not including 4.14.6, and from 4.15.0 up to but not including 4.18.1. It was fixed in versions 4.14.6, 4.18.1, and 4.19.0.
How can this vulnerability impact me? :
This vulnerability can lead to arbitrary code execution within the Apache Camel process. If an attacker is able to write malicious serialized Java objects to the Consul KV store used by the camel-consul component, they can cause the Camel application to deserialize and execute this malicious code.
Such arbitrary code execution can compromise the security and integrity of the system running Apache Camel, potentially allowing the attacker to take control of the application, access sensitive data, disrupt services, or move laterally within the network.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability involves unsafe deserialization of Java-serialized objects from the Consul KV store by the camel-consul component. Detection involves identifying if your Apache Camel deployment is using a vulnerable version (from 3.0.0 before 4.14.6, or from 4.15.0 before 4.18.1) and if the Consul KV store contains suspicious or unexpected serialized Java objects.
You can check the version of Apache Camel running on your system with commands like:
- java -jar camel.jar --version
- or check your build or dependency management files (e.g., pom.xml for Maven) for the camel-consul component version.
To detect potentially malicious serialized objects in the Consul KV store, you can query the Consul KV store for keys used by camel-consul and inspect their values for Base64-encoded serialized Java objects. For example, using the Consul CLI:
- consul kv get -recurse <key-prefix>
Look for Base64-encoded data that might be deserialized by Camel. However, there are no specific commands documented to detect exploitation attempts directly.
What immediate steps should I take to mitigate this vulnerability?
The primary and recommended mitigation is to upgrade Apache Camel to a fixed version that addresses this vulnerability.
- Upgrade to Apache Camel version 4.19.0 or later.
- If you are using the 4.14.x long-term support (LTS) stream, upgrade to version 4.14.6.
- If you are using the 4.18.x stream, upgrade to version 4.18.1.
These upgrades include fixes that apply ObjectInputFilter or equivalent protections to prevent unsafe deserialization of untrusted data.
Additionally, restrict write access to the Consul KV store to trusted users and systems only, to prevent attackers from injecting malicious serialized objects.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify how the CVE-2026-27172 vulnerability impacts compliance with common standards and regulations such as GDPR or HIPAA.