CVE-2026-43866: Apache Camel JMS Deserialization Bypass – DefaultExchangeHolder Exploit
Apache Camel and its JMS-related components contain a critical deserialization bypass vulnerability that allows an attacker to inject malicious Exchange state into JMS applications. The issue stems from an incomplete fix to a prior vulnerability (CVE-2026-40860): while that patch added a class allowlist to prevent arbitrary object deserialization, it inadvertently allowed a Camel internal class (DefaultExchangeHolder) to slip through. An attacker who can publish a crafted ObjectMessage to a JMS queue or topic consumed by a vulnerable Camel application can exploit this to manipulate routing logic, inject headers, modify properties, and alter error handling—all without needing a complex deserialization gadget chain. The attack leverages only standard Java classes that all systems trust.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.3 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Weaknesses (CWE)
- CWE-502
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-06 / 2026-07-07
NVD description (verbatim)
Deserialization of Untrusted Data vulnerability in Apache Camel, Apache Camel JMS component. JmsBinding.extractBodyFromJms() in camel-jms - and the equivalent JmsBinding in camel-sjms - deserializes the payload of an incoming JMS ObjectMessage via jakarta.jms.ObjectMessage.getObject() whenever the mapJmsMessage option is enabled (the default) and Camel acts as a JMS consumer. The CVE-2026-40860 hardening added a post-deserialization class check that rejects classes outside the default allow-list java.**;javax.**;org.apache.camel.**;!*. However org.apache.camel.support.DefaultExchangeHolder itself lives in the allow-listed org.apache.camel.** namespace, so an ObjectMessage whose top-level object is a DefaultExchangeHolder passes the check. The receiving side then calls DefaultExchangeHolder.unmarshal() on it without requiring the transferExchange option to be enabled - an asymmetric trust boundary, since the sending side gates ObjectMessage and transferExchange handling but the receiving side did not - writing every non-null field of the holder into the Exchange: the message body, the IN and OUT headers, the exchange properties, the variables, the exchange id and the exception. An attacker who can publish an ObjectMessage to a queue or topic consumed by an affected Camel application can therefore inject arbitrary Exchange state using only universally-trusted java.lang and java.util types, with no deserialization gadget chain required, to manipulate routing and headers, exchange properties and error handling. The same handling applies to camel-sjms and camel-sjms2, and to the JMS-family components built on JmsComponent and JmsBinding: camel-amqp, camel-activemq and camel-activemq6. This is a bypass of the CVE-2026-40860 fix rather than a flaw in it. This issue affects Apache Camel: from 3.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0; Apache Camel: from 3.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0. Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. After upgrading, JMS ObjectMessage handling is disabled by default in camel-jms, camel-sjms and the JMS-family components (a new objectMessageEnabled option defaults to false at the component and endpoint level), so an incoming ObjectMessage - including a DefaultExchangeHolder payload - is no longer deserialized unless the option is explicitly enabled; only set objectMessageEnabled=true when the consumed JMS destination is fed exclusively by trusted producers. For deployments that cannot upgrade immediately, restrict publish access to the queues and topics consumed by Camel to trusted producers via JMS broker authorization, and do not expose JMS consumers that map ObjectMessage bodies to untrusted networks; a JMS-provider deserialization allow-list does not mitigate this specific bypass because the crafted payload uses only universally-trusted classes.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in JmsBinding.extractBodyFromJms() within camel-jms and its equivalent in camel-sjms, triggered when the mapJmsMessage option is enabled (default behavior). During deserialization of incoming JMS ObjectMessage payloads, the CVE-2026-40860 fix introduced a class allowlist (java.**, javax.**, org.apache.camel.**, !*) to restrict gadget chains. However, org.apache.camel.support.DefaultExchangeHolder—a Camel internal wrapper—resides within the allowlisted org.apache.camel.** namespace and passes the check. The receiving JMS consumer then automatically calls DefaultExchangeHolder.unmarshal() to deserialize the holder's contents into the Exchange without requiring the transferExchange option, creating an asymmetric trust boundary. An attacker can craft an ObjectMessage whose payload is a DefaultExchangeHolder instance populated with arbitrary Exchange state (body, IN/OUT headers, properties, variables, ID, and exception) using only universally trusted java.lang and java.util types. This bypass affects camel-jms, camel-sjms, camel-sjms2, camel-amqp, camel-activemq, and camel-activemq6.
Business impact
Organizations running Apache Camel as a message broker integration layer face significant operational risk. A successful attack could redirect messages to unintended endpoints, corrupt application state, inject malicious headers that trigger downstream exploits, or corrupt error handling to mask attacks. In environments where Camel orchestrates critical workflows—financial transactions, healthcare data routing, supply-chain logistics—an attacker can silently manipulate message flow without authentication. The impact extends beyond confidentiality and integrity; availability is also at risk if error handling is manipulated to cause application faults or loops. Remediation requires either immediate patching or restricting JMS broker access to trusted producers only, both of which carry implementation burden.
Affected systems
Apache Camel versions 3.0.0 through 4.14.7, 4.15.0 through 4.18.2, and 4.19.0 through 4.20.x are vulnerable. The affected JMS components include camel-jms, camel-sjms, camel-sjms2, camel-amqp, camel-activemq, and camel-activemq6. Any deployment where Camel consumes ObjectMessage payloads from JMS queues or topics is at risk, particularly in multi-tenant or network-exposed environments. LTS users on the 4.14.x stream should upgrade to 4.14.8; 4.18.x users should upgrade to 4.18.3; all others should move to 4.21.0 or later.
Exploitability
Exploitability is high. The attack requires network-level access to publish an ObjectMessage to a JMS broker that feeds a vulnerable Camel consumer—a realistic scenario in cloud environments, microservice architectures, and any setting where JMS is used for inter-service communication. The attacker does not need a gadget chain, zero-day deserialization payload, or complex JNDI tricks; the attack uses only standard Java serialized objects. No user interaction is required, and successful exploitation leaves minimal forensic traces beyond altered message routing and state. Organizations with untrusted producers or exposed JMS brokers face immediate risk.
Remediation
Immediate action: Upgrade Apache Camel to version 4.21.0 (general releases), 4.14.8 (4.14.x LTS), or 4.18.3 (4.18.x LTS). Upgrading disables ObjectMessage deserialization by default; enable the new objectMessageEnabled option only if the JMS destination is fed exclusively by trusted internal producers. For organizations unable to patch immediately, implement JMS broker-level authorization to restrict publish access to trusted producers only, and isolate Camel JMS consumers from untrusted networks. Do not rely solely on JMS provider deserialization allowlists, as this bypass uses only universally-trusted classes.
Patch guidance
Apply the appropriate patch version for your release stream: 4.21.0 (recommended), 4.18.3 (4.18.x branch), or 4.14.8 (4.14.x LTS). After patching, verify that the objectMessageEnabled option defaults to false at both component and endpoint levels. If your integration requires ObjectMessage handling, enable objectMessageEnabled=true only after confirming the JMS destination is connected exclusively to trusted producers. Test in a staging environment to ensure the default disable does not break existing message flows; many deployments may not use ObjectMessage at all and will be unaffected. Review any custom code that sets mapJmsMessage or overrides JMS binding behavior.
Detection guidance
Monitor JMS broker logs for ObjectMessage traffic to queues and topics consumed by Camel. Look for messages with serialized DefaultExchangeHolder objects or unusual Exchange properties injected into message headers. On the Camel side, enable debug logging for org.apache.camel.component.jms.JmsBinding to observe deserialize operations. Check for unexpected header injection, routing changes, or property mutations that correlate with ObjectMessage consumption. In a defense-in-depth approach, instrument Exchange creation and mutation points to detect state changes that originate from deserialization rather than normal processing. Network-level detection is difficult because the attack uses standard JMS ObjectMessage format; focus on behavioral anomalies (unexpected routing, error spikes, header corruption).
Why prioritize this
This is a HIGH-severity bypass of a prior security fix that affects core JMS integration in Apache Camel. The combination of high exploitability, no authentication required, access to network, and the ability to manipulate application state without a gadget chain makes this a critical priority for any organization using Camel with JMS. The asymmetric trust boundary design flaw means that even organizations that believed they had mitigated CVE-2026-40860 are still vulnerable. Affected systems should be patched within days, not weeks.
Risk score, explained
CVSS 3.1 score of 7.3 (HIGH) reflects network accessibility (AV:N), low attack complexity (AC:L), no privilege requirement (PR:N), no user interaction (UI:N), and impact on confidentiality, integrity, and availability (C:L/I:L/A:L). The score does not fully capture the severity of state injection into application routing logic; in real-world Camel orchestration environments, the integrity impact could be substantial. The score is appropriate for a general-purpose framework scoring, but organization-specific risk depends on how Camel is deployed and what downstream systems consume the manipulated messages.
Frequently asked questions
Why does the CVE-2026-40860 fix not prevent this attack?
CVE-2026-40860 added a class allowlist to block gadget chain deserialization. However, the allowlist included org.apache.camel.** to permit legitimate Camel classes. DefaultExchangeHolder—an internal Camel wrapper—lives in that allowlisted namespace, so it passes the check. The prior fix assumed that if DefaultExchangeHolder made it past the allowlist, it would only be processed if the transferExchange option was explicitly enabled. This assumption proved incorrect: the receiving side deserializes and processes DefaultExchangeHolder without requiring transferExchange, creating an asymmetry in the trust boundary between sender and receiver.
Do I need to enable objectMessageEnabled after patching?
No, unless your integration genuinely requires ObjectMessage deserialization from an external source. The default is false, which disables ObjectMessage processing entirely. Enable it only if your JMS destination is fed by trusted internal producers and you have a specific business need for ObjectMessage serialization. If you are unsure, leave it disabled; most Camel users can operate with TextMessage or BytesMessage alternatives.
Does a JMS broker deserialization allowlist protect against this attack?
No. The advisory explicitly notes that JMS provider deserialization allowlists do not mitigate this bypass because the attack payload uses only universally-trusted classes like java.lang and java.util. Broker-level deserialization filtering cannot distinguish between a legitimate DefaultExchangeHolder and a malicious one. Protection depends on restricting who can publish to the queues and topics that Camel consumes.
Is this vulnerability exploitable if my Camel application only consumes TextMessage, not ObjectMessage?
Not via this specific attack vector. If your application is configured to consume only TextMessage or BytesMessage, ObjectMessage deserialization does not occur by default (mapJmsMessage processes the payload type it receives). However, you should verify your broker configuration and Camel consumer endpoints to confirm ObjectMessage is not being received. If there is any ambiguity, apply the patch and explicitly set objectMessageEnabled=false as a defense-in-depth measure.
This analysis is based on the CVE-2026-43866 advisory as published. Organizations should verify patch version numbers and affected product versions against official Apache Camel security bulletins and vendor documentation. Exploitability assessment assumes standard JMS broker deployment; specific risk varies by configuration, network isolation, and trust boundaries in your environment. This document does not constitute legal advice or warranty of any kind. SEC.co recommends engaging qualified security and infrastructure teams during patch assessment and deployment. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-40859HIGHApache Camel Java Deserialization RCE Vulnerability – Urgent Patch Required
- CVE-2026-42359HIGHApache Airflow XCom PATCH RCE Bypass of CVE-2026-33858
- CVE-2026-42527HIGHApache Camel Deserialization DNS Reconnaissance Vulnerability
- CVE-2026-43825HIGHApache OpenNLP SvmDoccatModel Unsafe Deserialization RCE
- CVE-2026-43865HIGHApache Camel Hazelcast Deserialization RCE Vulnerability
- CVE-2026-45360HIGHApache Airflow Scheduler Unsafe Deserialization Privilege Escalation
- CVE-2026-46590HIGHApache Camel PQC Unsafe Deserialization Remote Code Execution
- CVE-2026-50632HIGHApache CXF Incomplete JMS Deserialization Fix Enables RCE