CVE-2026-40859: Apache Camel Java Deserialization RCE Vulnerability – Urgent Patch Required
Apache Camel's vertx-http component contains a critical deserialization flaw that can lead to remote code execution. When the component is configured to transfer exceptions from backend HTTP responses (an opt-in setting), it deserializes Java objects from responses without any safety checks. An attacker controlling or intercepting the backend service can send a malicious serialized object that, if suitable gadget classes exist in the application's dependencies, executes arbitrary code on the Camel host. This vulnerability requires non-default configuration to trigger and relies on either compromising the backend service or intercepting unencrypted HTTP traffic.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.1 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-502
- Affected products
- 2 configuration(s)
- Published / Modified
- 2026-07-06 / 2026-07-07
NVD description (verbatim)
Deserialization of Untrusted Data vulnerability in Apache Camel. The camel-vertx-http component deserializes HTTP response bodies carrying the Content-Type application/x-java-serialized-object using a raw java.io.ObjectInputStream, without applying any ObjectInputFilter (VertxHttpHelper.deserializeJavaObjectFromStream) This deserialization path is reached only when the producer endpoint is configured with transferException=true (or the component-level allowJavaSerializedObject=true) and throwExceptionOnFailure is left at its default value of true; in that case a backend HTTP response with a 5xx status and the application/x-java-serialized-object content type has its body deserialized with no class restrictions. An attacker who controls the backend the Camel producer talks to - through a man-in-the-middle position on an unencrypted (plain HTTP) connection, or by compromising the backend service - can return a crafted serialized Java object and, if a suitable gadget chain is present on the classpath, achieve remote code execution on the Camel application host. The path is not reachable in the default configuration, where transferException is false. This issue affects Apache Camel: from 4.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.20.0. Users are recommended to upgrade to version 4.20.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, the deserialization performed by both helper utilities is constrained by a default ObjectInputFilter (allow-list java.**;javax.**;org.apache.camel.**;!*), which can be customised through the new deserializationFilter endpoint option or the JVM-wide -Djdk.serialFilter system property. For deployments that cannot upgrade immediately: do not enable transferException=true (or allowJavaSerializedObject=true) on producers that talk to untrusted or network-reachable backends; ensure producer connections use TLS (https) so that a response cannot be substituted by a man-in-the-middle; and, where the option is required, set an explicit -Djdk.serialFilter allow-list (for example java.**;org.apache.camel.**;!*) to constrain deserialization.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in VertxHttpHelper.deserializeJavaObjectFromStream, which processes HTTP response bodies with Content-Type application/x-java-serialized-object using raw java.io.ObjectInputStream without an ObjectInputFilter. The attack path activates only when both transferException=true (or component-level allowJavaSerializedObject=true) and the default throwExceptionOnFailure=true are set, allowing a 5xx response with serialized Java content to be deserialized unrestricted. Exploitation requires either a man-in-the-middle position on plain HTTP connections or direct compromise of the backend service. Success depends on the presence of exploitable gadget chains in the application classpath. The issue affects Apache Camel versions 4.0.0–4.14.7, 4.15.0–4.18.2, and 4.19.0–4.19.x.
Business impact
Organizations using Apache Camel with vertx-http producers connected to external or network-reachable backends face remote code execution risk if non-default exception transfer settings are enabled. Compromise could allow attackers to execute arbitrary commands, steal sensitive data, modify transactions, or pivot to other systems. Risk is elevated in environments with poor network segmentation or unencrypted backend communications. The opt-in nature of the vulnerable configuration may limit exposure, but misconfiguration or legacy deployments could be at risk. Incident response and forensics would be required following exploitation.
Affected systems
Apache Camel versions 4.0.0 through 4.14.7, 4.15.0 through 4.18.2, and 4.19.0 through 4.19.x are affected. The vulnerability only activates in applications that explicitly configure transferException=true or allowJavaSerializedObject=true on vertx-http producer endpoints. Systems using default Camel configurations are not vulnerable. Any organization running Camel applications with custom exception-transfer logic connected to external or untrusted HTTP backends should inventory affected deployments immediately.
Exploitability
Exploitation is feasible but requires specific preconditions: either control of the backend service, a man-in-the-middle position on unencrypted HTTP, or a combination of both. The attack does not require user interaction or legitimate credentials. However, it does depend on suitable gadget chains being present in the application classpath; many standard Camel deployments will have such dependencies, but the exact exploitability varies by application configuration. The CVSS score of 8.1 (HIGH) reflects the high impact (remote code execution) balanced against the required non-default configuration and network position.
Remediation
Upgrade immediately to Apache Camel 4.20.0, 4.14.8, or 4.18.3 depending on your release stream. These versions introduce a default ObjectInputFilter restricting deserialization to safe package allowlists (java.**, javax.**, org.apache.camel.**) and reject all other classes. For organizations unable to patch immediately: disable transferException=true and allowJavaSerializedObject=true unless absolutely necessary; enforce TLS (HTTPS) for all backend connections to prevent man-in-the-middle substitution; and set an explicit JVM-wide -Djdk.serialFilter allowlist (e.g., java.**;org.apache.camel.**;!*) to constrain deserialization of any untrusted data.
Patch guidance
Verify your current Apache Camel version and release stream. If on 4.14.x (LTS), upgrade to 4.14.8 or later. If on 4.15.x–4.18.x, upgrade to 4.18.3 or later. If on 4.19.x or 4.20.0+, ensure you are on 4.20.0 or later. After patching, review your endpoint configurations to confirm transferException and allowJavaSerializedObject settings are set conservatively. Test the new deserializationFilter endpoint option if you require custom class allowlists. Consult the Apache Camel release notes and security advisory for version-specific migration details.
Detection guidance
Monitor application logs for ObjectInputStream deserialization errors or unexpected ClassNotFoundException messages related to serialized objects. Inspect vertx-http producer endpoint configurations for transferException=true or allowJavaSerializedObject=true settings; any such configurations should be reviewed and tested. Capture and inspect HTTP traffic between Camel applications and backends for responses with Content-Type application/x-java-serialized-object, especially on non-HTTPS connections. Implement network segmentation to restrict backend access and require mutual TLS. Review application dependencies for known gadget chains (e.g., commons-collections, spring-core) that could enable exploitation if deserialization occurs.
Why prioritize this
This vulnerability merits immediate attention despite its opt-in configuration requirement. Remote code execution on the Camel application host is a critical outcome, and the attack surface expands significantly in organizations with legacy configurations, misconfigured exception handling, or untrusted backend integrations. The CVSS 8.1 (HIGH) score and the existence of standard gadget chains in typical Java classpath dependencies make this a real and present threat. Patching is straightforward and low-risk, making rapid remediation highly advisable.
Risk score, explained
The CVSS 3.1 score of 8.1 reflects a HIGH severity vulnerability with a high impact (code execution, data breach, system compromise) and moderate attack complexity. The attack vector is network-based, but exploitation requires either control of a backend service or a privileged network position (man-in-the-middle on plain HTTP). The requirement for non-default configuration (transferException=true) and suitable gadget chains reduces the attack complexity but does not eliminate the risk, as both are common in real deployments. The scoring assumes an attacker with no privileges and no user interaction required.
Frequently asked questions
Is my application vulnerable if I use Apache Camel but don't configure transferException=true?
No. The vulnerability is only reachable when transferException=true or the component-level allowJavaSerializedObject=true is explicitly set. If you use default Camel configurations, you are not affected by this flaw. Review your vertx-http producer endpoint definitions to confirm these settings are disabled or absent.
What if I cannot upgrade Camel immediately?
As an interim measure, disable transferException and allowJavaSerializedObject on all producers that communicate with external or untrusted backends. Enforce TLS (HTTPS) for all backend connections to prevent man-in-the-middle attacks. Additionally, set a JVM-wide deserialization filter using -Djdk.serialFilter=java.**;org.apache.camel.**;!* to block unexpected class deserialization. These steps significantly reduce exploitability while you prepare to patch.
How do I know if an attacker has exploited this vulnerability?
Look for unusual process execution, unexpected network connections, or system resource consumption on Camel application hosts. Check application and system logs for ObjectInputStream errors, ClassNotFoundException messages related to serialized objects, or unexpected exceptions during HTTP response handling. Monitor for HTTP responses with Content-Type application/x-java-serialized-object, especially from external sources. Implement behavioral monitoring and threat detection rules to catch suspicious deserialization activity.
Does this affect the latest versions of Camel released after 4.20.0?
No. Versions 4.20.0 and later include the fix. The patch introduces a default ObjectInputFilter that restricts deserialization to known-safe packages. If you are on a version newer than 4.20.0, or on 4.14.8+ (LTS) or 4.18.3+, you have received the fix. Verify your exact version in your dependency manifest or application logs.
This analysis is provided for informational and educational purposes only and does not constitute legal, regulatory, or professional security advice. The information herein reflects publicly available data and vendor advisories as of the publication date. Readers are responsible for validating all findings, patch versions, and affected product versions against authoritative sources and vendor documentation before taking any remediation action. Security risk assessments and patch timelines should be conducted in consultation with your organization's security and development teams. SEC.co makes no warranty regarding the completeness or accuracy of this analysis and shall not be liable for any direct or indirect damages arising from reliance on this content. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- 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-43866HIGHApache Camel JMS Deserialization Bypass – DefaultExchangeHolder Exploit
- 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