Skip to content
Heist/ feed
Back to feed
Critical

Apache Camel: Unsafe Deserialization of JMS ObjectMessage in camel-jms, camel-sjms, camel-sjms2 and camel-amqp

Type: advisorySources: OSV

JmsBinding.extractBodyFromJms() in camel-jms, and the equivalent JmsBinding class in camel-sjms, deserialized the payload of incoming JMS ObjectMessage values via javax.jms.ObjectMessage.getObject() without applying any ObjectInputFilter, class allowlist or class denylist. Because this code path is reached whenever the mapJmsMessage option is enabled (the default) and Camel acts as a JMS consumer, an attacker able to publish a crafted ObjectMessage to a queue or topic consumed by a Camel application could achieve remote code execution when a deserialization gadget chain was present on the classpath. The same handling was reached transitively through camel-sjms2 (whose Sjms2Endpoint extends SjmsEndpoint) and through camel-amqp (whose AMQPJmsBinding extends JmsBinding), and by other JMS-family components built on JmsComponent such as camel-activemq and camel-activemq6. This issue affects Apache Camel: from 3.0.0 before 4.14.7, from 4.15.0 before 4.18.2, from 4.19.0 before 4.20.0. Users are recommended to upgrade to version 4.20.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.7. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.2.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40860
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 02:35 UTC · Revision 1

Source evidence

Apache Camel: Unsafe Deserialization of JMS ObjectMessage in camel-jms, camel-sjms, camel-sjms2 and camel-amqp

core-osv · Original source

Published 27 Apr 2026, 08:03 UTC

JmsBinding.extractBodyFromJms() in camel-jms, and the equivalent JmsBinding class in camel-sjms, deserialized the payload of incoming JMS ObjectMessage values via javax.jms.ObjectMessage.getObject() without applying any ObjectInputFilter, class allowlist or class denylist. Because this code path is reached whenever the mapJmsMessage option is enabled (the default) and Camel acts as a JMS consumer, an attacker able to publish a crafted ObjectMessage to a queue or topic consumed by a Camel application could achieve remote code execution when a deserialization gadget chain was present on the classpath. The same handling was reached transitively through camel-sjms2 (whose Sjms2Endpoint extends SjmsEndpoint) and through camel-amqp (whose AMQPJmsBinding extends JmsBinding), and by other JMS-family components built on JmsComponent such as camel-activemq and camel-activemq6. This issue affects Apache Camel: from 3.0.0 before 4.14.7, from 4.15.0 before 4.18.2, from 4.19.0 before 4.20.0. Users are recommended to upgrade to version 4.20.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.7. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.2.

osv:CVE-2026-40860
Complete source record
{
  "id": "6a9839380ef718ba384ee4f2503d292b7b79f1a557b4e9af2d846a23517078c1",
  "url": "https://osv.dev/vulnerability/CVE-2026-40860",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Apache Camel: Unsafe Deserialization of JMS ObjectMessage in camel-jms, camel-sjms, camel-sjms2 and camel-amqp",
    "summary": "JmsBinding.extractBodyFromJms() in camel-jms, and the equivalent JmsBinding class in camel-sjms, deserialized the payload of incoming JMS ObjectMessage values via javax.jms.ObjectMessage.getObject() without applying any ObjectInputFilter, class allowlist or class denylist. Because this code path is reached whenever the mapJmsMessage option is enabled (the default) and Camel acts as a JMS consumer, an attacker able to publish a crafted ObjectMessage to a queue or topic consumed by a Camel application could achieve remote code execution when a deserialization gadget chain was present on the classpath. The same handling was reached transitively through camel-sjms2 (whose Sjms2Endpoint extends SjmsEndpoint) and through camel-amqp (whose AMQPJmsBinding extends JmsBinding), and by other JMS-family components built on JmsComponent such as camel-activemq and camel-activemq6. This issue affects Apache Camel: from 3.0.0 before 4.14.7, from 4.15.0 before 4.18.2, from 4.19.0 before 4.20.0. Users are recommended to upgrade to version 4.20.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.7. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.2.",
    "evidence": "osv:CVE-2026-40860",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-40860",
      "aliases": [
        "CVE-2026-40860",
        "GHSA-m5vh-3fw5-5wgh"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apache/camel",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ac11f88de7594232c3c28532a19377764665ce13"
                },
                {
                  "fixed": "d8b8b58531b4731bc1af9fdd7f73cff1817c7cee"
                },
                {
                  "introduced": "038f1b2acd0b2ee78e4bb84cd3139e64610bb259"
                },
                {
                  "fixed": "2326a42c5595aa1eee21caafeee75f8e7f0261ea"
                },
                {
                  "introduced": "3e9f3011ad48de66fef582ade9794c7340c23af7"
                },
                {
                  "last_affected": "3e9f3011ad48de66fef582ade9794c7340c23af7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "4.14.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.15.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-40860.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.638476992Z",
      "provider": "osv",
      "references": [
        "https://repo.maven.apache.org/maven2",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40860.json",
        "https://access.redhat.com/errata/RHSA-2026:17668",
        "https://access.redhat.com/errata/RHSA-2026:22453",
        "https://access.redhat.com/security/cve/CVE-2026-40860",
        "https://camel.apache.org/security/CVE-2026-40860.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40860.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40860",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2463172"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-502"
        ],
        "cna_assigner": "apache",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.0.0"
                  },
                  {
                    "fixed": "4.14.7"
                  },
                  {
                    "introduced": "4.15.0"
                  },
                  {
                    "fixed": "4.18.2"
                  },
                  {
                    "introduced": "4.19.0"
                  },
                  {
                    "fixed": "4.20.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40860.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40860",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 499740,
  "published_at": "2026-04-27T08:03:19.616+00:00"
}