Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Unsafe deserialization in Apache Camel Camel-PQC FileBasedKeyLifecycleManager

IdentifiersCVE-2026-40048CWE-502· Deserialization of Untrusted Data

CVE-2026-40048 is an unsafe deserialization vulnerability in the Camel-PQC component of Apache Camel, specifically in the FileBasedKeyLifecycleManager class. The vulnerable code deserializes <keyId>.key files from the configured key directory using java.io.ObjectInputStream without applying ObjectInputFilter controls or class-loading restrictions. Because the returned object is only cast to java.security.KeyPair after readObject() completes, attacker-controlled readObject() side effects can execute before any type validation occurs. If an attacker can place a crafted serialized Java object in the configured key directory, deserialization during normal key lifecycle operations can trigger arbitrary code execution in the application context. The issue affects Apache Camel versions 4.19.0 before 4.20.0 and 4.18.0 before 4.18.2.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation results in arbitrary code execution in the context of the vulnerable Camel application. This can allow an attacker to execute arbitrary Java gadget chains or other deserialization payloads with the privileges of the application process, potentially leading to full compromise of the application instance, access to sensitive data available to the process, tampering with key material or application state, and follow-on lateral movement depending on the deployment environment.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrade is not possible, prevent any untrusted or indirect write access to the configured Camel-PQC key directory. Harden filesystem permissions on the key storage volume, eliminate path traversal and symlink write paths into that directory, and secure any key provisioning or deployment pipeline that can populate <keyId>.key files. Restrict who and what can modify the directory contents, monitor for unexpected serialized object files, and isolate the application process to reduce impact if exploitation occurs. However, these are compensating controls only; the primary mitigation is to upgrade to a fixed version.

Remediation

Patch, then assume compromise.

Upgrade Apache Camel to a fixed release. Apache states that the issue is fixed in 4.20.0 and 4.18.2. The fix removes ObjectInputStream-based key and metadata storage and replaces it with standard PKCS#8 for private keys and X.509 SubjectPublicKeyInfo for public keys, encoded as Base64 JSON. Users on the 4.18.x LTS stream should upgrade to 4.18.2; other affected users should upgrade to 4.20.0 or later.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Apache Software FoundationCamelapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.