CVE-2026-40048
JSON

7.8high

Apache Camel PQC: Unsafe Deserialization from FileBasedKeyLifecycleManager

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.33% (higher than 28% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-v3vg-332r-mw99

Description

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.

Affected

Product or packageVersionsReported by
org.apache.camel:camel-pqcfrom 4.19.0 before 4.20.0, from 4.18.0 before 4.18.2CVE List
camel-pqcNot specifiedCVE List
org.apache.camel:camel-pqc (Maven)before 4.18.2, from 4.19.0 before 4.20.0GitHub Advisory Database
apache camelfrom 4.18.0 before 4.18.2, 4.19.0NVD

All scores

CISA-ADP7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
redhat-SADP7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-502

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

La clase Camel-PQC FileBasedKeyLifecycleManager deserializa el contenido de los archivos ’[keyId].key’ en el directorio de claves configurado utilizando java.io.ObjectInputStream sin aplicar ningún ObjectInputFilter o restricciones de carga de clases. La conversión a ’java.security.KeyPair’ se evalúa solo después de que ’readObject()’ ya haya retornado, por lo que cualquier efecto secundario de ’readObject()’ en el objeto deserializado se ejecuta antes de la verificación de tipo. Un atacante que puede escribir en el directorio de claves utilizado por una aplicación Camel - por ejemplo, a través de un salto de ruta en el directorio, permisos de sistema de archivos mal configurados en el volumen donde se almacenan las claves, una canalización de aprovisionamiento de claves comprometida o un ataque de enlace simbólico - puede colocar un objeto Java serializado manipulado que, cuando se deserializa durante las operaciones normales del ciclo de vida de las claves, resulta en ejecución de código arbitrario en el contexto de la aplicación. Este problema afecta a Apache Camel: desde 4.19.0 antes de 4.20.0, desde 4.18.0 antes de 4.18.2. Se recomienda a los usuarios actualizar a la versión 4.20.0, que soluciona el problema reemplazando el almacenamiento de claves y metadatos basado en java.io.ObjectInputStream con codificación JSON Base64 estándar PKCS#8 (clave privada) / X.509 SubjectPublicKeyInfo (clave pública). Para los usuarios en la rama de versiones LTS 4.18.x, actualice a 4.18.2.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-40048 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-v3vg-332r-mw99 changed 2026-11-04CC-BY-4.0
NVDCVE-2026-40048 changed 2026-10-26Public domain