Skip to content
Heist/ feed
Back to feed
High

Apache Camel PQC: Unsafe Deserialization from FileBasedKeyLifecycleManager

Type: advisorySources: OSV

The Camel-PQC FileBasedKeyLifecycleManager class deserializes the contents of `.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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40048
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 16:20 UTC · Revision 1

Source evidence

Apache Camel PQC: Unsafe Deserialization from FileBasedKeyLifecycleManager

core-osv · Original source

Published 27 Apr 2026, 07:53 UTC

The Camel-PQC FileBasedKeyLifecycleManager class deserializes the contents of `.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.

osv:CVE-2026-40048
Complete source record
{
  "id": "99041ab6a7c82a91a897760ce9767ae85d3d92b4ae94dffea8e548de20a1ed51",
  "url": "https://osv.dev/vulnerability/CVE-2026-40048",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Apache Camel PQC: Unsafe Deserialization from FileBasedKeyLifecycleManager",
    "summary": "The Camel-PQC FileBasedKeyLifecycleManager class deserializes the contents of `.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.",
    "evidence": "osv:CVE-2026-40048",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-40048",
      "aliases": [
        "CVE-2026-40048",
        "GHSA-v3vg-332r-mw99"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apache/camel",
              "type": "GIT",
              "events": [
                {
                  "introduced": "dd22f752e240bd1343af15c775ef02d754f6df38"
                },
                {
                  "fixed": "2326a42c5595aa1eee21caafeee75f8e7f0261ea"
                },
                {
                  "introduced": "3e9f3011ad48de66fef582ade9794c7340c23af7"
                },
                {
                  "last_affected": "3e9f3011ad48de66fef582ade9794c7340c23af7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.18.0"
                      },
                      {
                        "fixed": "4.18.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:apache:camel:4.19.0:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.19.0"
                      },
                      {
                        "last_affected": "4.19.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "4.19.0",
            "camel-4.19.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40048.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.306641688Z",
      "provider": "osv",
      "references": [
        "https://repo.maven.apache.org/maven2",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40048.json",
        "https://access.redhat.com/security/cve/CVE-2026-40048",
        "https://camel.apache.org/security/CVE-2026-40048.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40048.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40048",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2463176"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-502"
        ],
        "cna_assigner": "apache",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.19.0"
                  },
                  {
                    "fixed": "4.20.0"
                  },
                  {
                    "introduced": "4.18.0"
                  },
                  {
                    "fixed": "4.18.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40048.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40048",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497302,
  "published_at": "2026-04-27T07:53:54.636+00:00"
}