---
id: "CVE-2026-40048"
kind: "vulnerability"
aliases: ["CVE-2026-40048", "GHSA-v3vg-332r-mw99"]
title: "Camel-PQC Vulnerable to Deserialization of Untrusted Data"
severity: "high"
cvss: 7.8
epss: 0.00327
exploited: false
status: "open"
category: "package"
products: [{"name": "org.apache.camel:camel-pqc", "fixed": ["4.18.2"], "affected": "< 4.18.2", "ecosystem": "maven"}, {"name": "org.apache.camel:camel-pqc", "fixed": ["4.20.0"], "affected": "= 4.19.0", "ecosystem": "maven"}, {"name": "apache camel", "fixed": ["4.18.2"], "affected": ">= 4.18.0, < 4.18.2", "ecosystem": "vendor"}, {"name": "apache camel", "fixed": [], "affected": "= 4.19.0", "ecosystem": "vendor"}]
ecosystems: ["maven", "vendor"]
tags: ["apache-camel", "camel-pqc", "cwe-502", "java", "package"]
not_affected_if: ["camel-pqc-not-used", "locked-key-directory", "non-file-key-storage"]
published_at: "2026-04-27T09:16:01+00:00"
first_seen_at: "2026-11-04T03:31:21+00:00"
updated_at: "2026-11-04T03:46:40+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-v3vg-332r-mw99", "first_seen_at": "2026-11-04T03:31:21+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40048", "first_seen_at": "2026-11-04T03:46:40+00:00"}]
---

# Camel-PQC Vulnerable to Deserialization of Untrusted Data

Apache Camel's camel-pqc module reads key files from its key directory with Java's ObjectInputStream without any filter, so a crafted serialized object runs code during key loading. An attacker who can write files into that key directory can execute code inside the Camel application.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- maven:org.apache.camel:camel-pqc affected < 4.18.2 fixed 4.18.2
- maven:org.apache.camel:camel-pqc affected = 4.19.0 fixed 4.20.0
- vendor:apache camel affected >= 4.18.0, < 4.18.2 fixed 4.18.2
- vendor:apache camel affected = 4.19.0 fixed ?

## How to check

- Check the camel-pqc version in the Maven dependency tree, e.g. `mvn dependency:tree | grep camel-pqc`
- Confirm whether the application uses FileBasedKeyLifecycleManager with a key directory
- Check who can write to that key directory, including volume permissions and provisioning pipelines

## Fix

- Apache Camel `4.18.2` for the 4.18.x LTS stream (affected 4.18.0 before 4.18.2)
- Apache Camel `4.20.0` for the 4.19.x line (affected 4.19.0)

## Timeline

- 2026-11-04T03:31:21+00:00 ghsa https://github.com/advisories/GHSA-v3vg-332r-mw99
- 2026-11-04T03:46:40+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-40048

## Documents

- [advisory] Vendor advisory: camel.apache.org https://camel.apache.org/security/CVE-2026-40048.html
- [advisory] Third-party advisory: www.openwall.com http://www.openwall.com/lists/oss-security/2026/04/26/6
- [fix] Patch: github.com https://github.com/apache/camel/pull/22034
- [fix] Patch: github.com https://github.com/apache/camel/pull/22495
- [fix] Patch: github.com https://github.com/apache/camel/commit/5bdd0f1d3289dfa78116deec6c81083708bf432d
- [fix] Patch: github.com https://github.com/apache/camel/commit/5f87a86f4e337efc59248d278c6a5650e73b3b7c

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
