CVE-2026-40048: Apache Camel PQC: Unsafe Deserialization from FileBasedKeyLifecycleManager
The Camel-PQC FileBasedKeyLifecycleManager class deserializes the contents of `<keyId>.key` files in the configured key directory using java.io.ObjectInputStream without applying any ObjectInputFilter or class-loading restrictions. The cast to `java.security.KeyPair` is evaluated only after `readObject()` has already returned, so any `readObject()` side effects in the deserialized object run before the type check. An attacker who can write to the key directory used by a Camel application — for example through a path traversal into the directory, misconfigured filesystem permissions on the volume where keys are stored, a compromised key provisioning pipeline, or a symlink attack — can place a crafted serialized Java object that, when deserialized during normal key lifecycle operations, results in arbitrary code execution in the context of the application.
This issue affects Apache Camel: from 4.19.0 before 4.20.0, from 4.18.0 before 4.18.2.
Users are recommended to upgrade to version 4.20.0, which fixes the issue by replacing java.io.ObjectInputStream-based key and metadata storage with standard PKCS#8 (private key) / X.509 SubjectPublicKeyInfo (public key) Base64 JSON encoding. For users on the 4.18.x LTS releases stream, upgrade to 4.18.2.
Security readout for executives and security teams
Plain-English summary
CVE-2026-40048 is a high-severity Apache Camel PQC flaw. If an attacker can place a malicious key file in the application's configured key directory, normal key handling can execute attacker-controlled code inside the Camel application process.
Executive priority
Treat this as urgent for affected Camel PQC deployments, but prioritize by exposure. Systems where untrusted users, pipelines, or services can influence the key directory should be patched first.
Technical view
Apache Camel PQC FileBasedKeyLifecycleManager deserializes <keyId>.key files with java.io.ObjectInputStream without ObjectInputFilter or class restrictions. Deserialization side effects occur before the KeyPair cast, enabling arbitrary code execution when a crafted serialized object is read.
Likely exposure
Exposure is limited to Apache Camel applications using org.apache.camel:camel-pqc versions 4.19.0 or 4.18.0 before the fixed releases, especially where the configured key directory is writable through permissions, traversal, symlinks, or provisioning weaknesses.
Exploitation context
The source bundle does not cite active exploitation, and KEV is false. Exploitation requires attacker ability to write into the key directory, then have the application deserialize the crafted file during normal key lifecycle operations.
Researcher notes
The fix replaces Java ObjectInputStream-based key and metadata storage with PKCS#8 private key and X.509 SubjectPublicKeyInfo public key Base64 JSON encoding. Evidence supports CWE-502 unsafe deserialization and CVSS 7.8 high severity.
Mitigation direction
Upgrade Apache Camel to 4.20.0.
For the 4.18.x LTS stream, upgrade to 4.18.2.
Restrict write access to the configured PQC key directory.
Review key provisioning paths for traversal, symlink, and permission weaknesses.
Check Apache Camel vendor guidance for migration details.
Validation and detection
Inventory deployments using org.apache.camel:camel-pqc.
Confirm no affected versions 4.19.0 or 4.18.0 remain.
Identify use of FileBasedKeyLifecycleManager and its key directory.
Audit key directory ownership, permissions, mounts, and symlink handling.
Review recent unexpected changes to files ending in .key.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-502: Code execution behavior lookup
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
3ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.