Apache Camel Camel-PQC Unsafe Deserialization Enables Code Execution
Vulnerability Disclosure · 4 sources · Updated 5mo ago · First seen Apr 26, 2026

Apache disclosed CVE-2026-40048, an unsafe deserialization flaw in the Camel-PQC component of Apache Camel that can lead to arbitrary code execution. The vulnerability is in FileBasedKeyLifecycleManager, which deserializes <keyId>.key files with java.io.ObjectInputStream without ObjectInputFilter or class-loading restrictions, allowing malicious readObject() behavior to run before the data is cast to java.security.KeyPair. An attacker who can place a crafted file in the configured key directory—through path traversal, weak filesystem permissions, a compromised key provisioning pipeline, or a symlink attack—could execute code in the context of the Camel application.
The issue affects org.apache.camel:camel-pqc versions 4.19.0 before 4.20.0 and 4.18.0 before 4.18.2. Apache fixed the flaw by replacing ObjectInputStream-based key and metadata storage with PKCS#8 and X.509 SubjectPublicKeyInfo Base64 JSON encoding, and advised users to upgrade to 4.20.0 or 4.18.2 on the 4.18.x LTS line. Apache credited Andrea Cosentino of the Apache Software Foundation and Venkatraman Kumar of Securin with discovering the vulnerability.
Why it matters
Impact assessment
Apache Camel deployments using the Camel-PQC component are affected if they run versions 4.19.0 before 4.20.0 or 4.18.0 before 4.18.2 and allow attacker influence over the configured key directory. The impact is severe because successful exploitation yields arbitrary code execution in the security context of the Camel application, creating risk of service compromise, data exposure, downstream pivoting, and operational disruption.
The exposure is not indiscriminate internet-scale by itself; exploitation requires the attacker to place a crafted file in the key directory through another weakness such as path traversal, weak filesystem permissions, a compromised key provisioning pipeline, or a symlink attack. No confirmed in-the-wild exploitation is stated in the references.
Affected entities
- Product: Apache Camel
- Component: org.apache.camel:camel-pqc
- Vulnerable class: FileBasedKeyLifecycleManager
- Affected versions:
- 4.19.0 before 4.20.0
- 4.18.0 before 4.18.2
Business impact details
- Arbitrary code execution in the Camel application context
- Potential compromise of integration workloads and connected systems
- Possible theft or manipulation of application data and cryptographic material
- Potential service interruption if malicious payloads disrupt key lifecycle operations
Scope and exploitation conditions
- Targeted exposure tied to deployments using Camel-PQC
- Requires write access or write influence over the configured key directory
- Listed enabling conditions:
- Path traversal into the key directory
- Misconfigured filesystem permissions
- Compromised key provisioning pipeline
- Symlink attack
Extracted facts
- CVE: CVE-2026-40048
- Severity stated by Apache advisory: High
- Severity stated in oss-sec disclosure: Important
- Internal tracking: CAMEL-23200
- Finders: Andrea Cosentino (Apache Software Foundation), Venkatraman Kumar (Securin)


