Executive brief
Apache Camel's post-quantum cryptography (PQC) component insecurely deserializes key metadata stored in HashiCorp Vault and AWS Secrets Manager using Java's ObjectInputStream without any input validation. An attacker with write access to these secret backends could inject a malicious serialized object that executes arbitrary code when the application loads the key, compromising the security of applications managing post-quantum keys for encrypted communications.
Technical details
The vulnerability is a deserialization-of-untrusted-data flaw (CWE-502) in Apache Camel's camel-pqc component. The HashicorpVaultKeyLifecycleManager and AwsSecretsManagerKeyLifecycleManager classes deserialize Base64-wrapped KeyMetadata objects using raw java.io.ObjectInputStream.readObject() calls without an ObjectInputFilter or class allow-list. Because the cast to KeyMetadata occurs only after deserialization completes, any gadget chain executed during readObject() runs before type validation, enabling arbitrary code execution. The same vulnerable pattern exists in FileBasedKeyLifecycleManager's legacy migration code. Exploitation requires write access to the backend (HashiCorp Vault KV path or AWS Secrets Manager secret), but does not require authentication to the application itself. The vulnerability is a follow-on to CVE-2026-40048, which partially addressed FileBasedKeyLifecycleManager but left it and the AWS/Vault managers unprotected. Patches are available in versions 4.18.3 (LTS) and 4.21.0 (current).
Affected products
- Apache Camel 4.18.0 to 4.18.2, 4.19.0 to 4.20.x
- Apache Camel PQC component 4.18.0 to 4.18.2, 4.19.0 to 4.20.x
Timeline
- 2026-07-06: disclosed: Published to GitHub Advisory Database and NVD
- 2026-07-06: patched: Version 4.18.3 and 4.21.0 released with fixes