cve-2026-40466

HIGH CVSS 8.8 nvd
Description

Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ. An authenticated attacker may bypass the fix in CVE-2026-34197 by adding a connector using an HTTP Discovery transport via BrokerView.addNetworkConnector or BrokerView.addConnector through Jolokia if the activemq-http module is on the classpath. A malicious HTTP endpoint can return a VM transport through the HTTP URI which will bypass the validation added in CVE-2026-34197. The attacker can then use the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext. Because Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec(). This issue affects Apache ActiveMQ Broker: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ All: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ: before 5.19.6, from 6.0.0 before 6.2.5. Users are recommended to upgrade to version 5.19.6 or 6.2.5, which fixes the issue.

Timeline
Published
2026-04-24
Last Modified
2026-10-26
CVSS Details
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
LOW
Affected Products
  • apache activemq
  • apache activemq_broker
Weaknesses (CWE)
CVSS metrics
Version Base Severity Vector Exploitability Impact Source
3.1 8.8 HIGH CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 2.8 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0
3.1 8.8 HIGH CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 2.8 5.9 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
CPE configurations
OR
CPE Version range Vulnerable
cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:* < 5.19.6 yes
cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:* >= 6.0.0, < 6.2.5 yes
OR
CPE Version range Vulnerable
cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:* < 5.19.6 yes
cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:* >= 6.0.0, < 6.2.5 yes
NVD metadata
NVD status
Modified
Source identifier
security@apache.org
References
Linked Vulnerabilities

{
  "cvss": 8.8,
  "datePublished": "2026-04-24T11:16:22.540",
  "dateUpdated": "2026-10-26T22:10:00.163",
  "description": "Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ.\n\n\n\nAn authenticated attacker may bypass the fix in CVE-2026-34197 by adding a connector using an HTTP Discovery transport via BrokerView.addNetworkConnector or BrokerView.addConnector through Jolokia if the activemq-http module is on the classpath.\nA malicious HTTP endpoint can return a VM transport through the HTTP URI which will bypass the validation added in CVE-2026-34197. The attacker can then use the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext.\nBecause Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec().\n\n\nThis issue affects Apache ActiveMQ Broker: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ All: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ: before 5.19.6, from 6.0.0 before 6.2.5.\n\nUsers are recommended to upgrade to version 5.19.6 or 6.2.5, which fixes the issue.",
  "id": "CVE-2026-40466",
  "raw": {
    "affected": [
      {
        "affectedData": [
          {
            "collectionURL": "https://repo.maven.apache.org/maven2",
            "defaultStatus": "unaffected",
            "packageName": "org.apache.activemq:activemq-broker",
            "product": "Apache ActiveMQ Broker",
            "vendor": "Apache Software Foundation",
            "versions": [
              {
                "lessThan": "5.19.6",
                "status": "affected",
                "version": "0",
                "versionType": "semver"
              },
              {
                "lessThan": "6.2.5",
                "status": "affected",
                "version": "6.0.0",
                "versionType": "semver"
              }
            ]
          },
          {
            "collectionURL": "https://repo.maven.apache.org/maven2",
            "defaultStatus": "unaffected",
            "packageName": "org.apache.activemq:activemq-all",
            "product": "Apache ActiveMQ All",
            "vendor": "Apache Software Foundation",
            "versions": [
              {
                "lessThan": "5.19.6",
                "status": "affected",
                "version": "0",
                "versionType": "semver"
              },
              {
                "lessThan": "6.2.5",
                "status": "affected",
                "version": "6.0.0",
                "versionType": "semver"
              }
            ]
          },
          {
            "collectionURL": "https://repo.maven.apache.org/maven2",
            "defaultStatus": "unaffected",
            "packageName": "org.apache.activemq:apache-activemq",
            "product": "Apache ActiveMQ",
            "vendor": "Apache Software Foundation",
            "versions": [
              {
                "lessThan": "5.19.6",
                "status": "affected",
                "version": "0",
                "versionType": "semver"
              },
              {
                "lessThan": "6.2.5",
                "status": "affected",
                "version": "6.0.0",
                "versionType": "semver"
              }
            ]
          }
        ],
        "source": "security@apache.org"
      },
      {
        "affectedData": [
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:amq_broker:7"
            ],
            "defaultStatus": "unaffected",
            "packageName": "activemq-broker",
            "product": "Red Hat AMQ Broker 7",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:jboss_data_grid:8"
            ],
            "defaultStatus": "unaffected",
            "packageName": "activemq-broker",
            "product": "Red Hat Data Grid 8",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/o:redhat:enterprise_linux:8"
            ],
            "defaultStatus": "unaffected",
            "packageName": "log4j:2/log4j",
            "product": "Red Hat Enterprise Linux 8",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/o:redhat:enterprise_linux:9"
            ],
            "defaultStatus": "unaffected",
            "packageName": "log4j",
            "product": "Red Hat Enterprise Linux 9",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:jboss_fuse:7"
            ],
            "defaultStatus": "unaffected",
            "packageName": "activemq-all",
            "product": "Red Hat Fuse 7",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:jboss_fuse:7"
            ],
            "defaultStatus": "unaffected",
            "packageName": "activemq-broker",
            "product": "Red Hat Fuse 7",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:jboss_enterprise_application_platform:7"
            ],
            "defaultStatus": "affected",
            "packageName": "activemq-broker",
            "product": "Red Hat JBoss Enterprise Application Platform 7",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:jboss_enterprise_application_platform:8"
            ],
            "defaultStatus": "unaffected",
            "packageName": "activemq-broker",
            "product": "Red Hat JBoss Enterprise Application Platform 8",
            "vendor": "Red Hat"
          },
          {
            "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
            "cpes": [
              "cpe:/a:redhat:jbosseapxp"
            ],
            "defaultStatus": "unaffected",
            "packageName": "activemq-broker",
            "product": "Red Hat JBoss Enterprise Application Platform Expansion Pack",
            "vendor": "Red Hat"
          }
        ],
        "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
      }
    ],
    "configurations": [
      {
        "nodes": [
          {
            "cpeMatch": [
              {
                "criteria": "cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*",
                "matchCriteriaId": "550C287A-18F0-462A-BFC9-2AD8A64B951A",
                "versionEndExcluding": "5.19.6",
                "vulnerable": true
              },
              {
                "criteria": "cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*",
                "matchCriteriaId": "F7BDD719-DDF9-42A2-AD9D-05FB6D758EF1",
                "versionEndExcluding": "6.2.5",
                "versionStartIncluding": "6.0.0",
                "vulnerable": true
              }
            ],
            "negate": false,
            "operator": "OR"
          }
        ]
      },
      {
        "nodes": [
          {
            "cpeMatch": [
              {
                "criteria": "cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:*",
                "matchCriteriaId": "8799E3CE-EA55-4470-9582-D1948706DEAF",
                "versionEndExcluding": "5.19.6",
                "vulnerable": true
              },
              {
                "criteria": "cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:*",
                "matchCriteriaId": "429CAFE7-6C7F-4670-B62D-C0D4D97D440F",
                "versionEndExcluding": "6.2.5",
                "versionStartIncluding": "6.0.0",
                "vulnerable": true
              }
            ],
            "negate": false,
            "operator": "OR"
          }
        ]
      }
    ],
    "cveTags": [],
    "descriptions": [
      {
        "lang": "en",
        "value": "Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ.\n\n\n\nAn authenticated attacker may bypass the fix in CVE-2026-34197 by adding a connector using an HTTP Discovery transport via BrokerView.addNetworkConnector or BrokerView.addConnector through Jolokia if the activemq-http module is on the classpath.\nA malicious HTTP endpoint can return a VM transport through the HTTP URI which will bypass the validation added in CVE-2026-34197. The attacker can then use the VM transport's brokerConfig parameter to load a remote Spring XML application context using ResourceXmlApplicationContext.\nBecause Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec().\n\n\nThis issue affects Apache ActiveMQ Broker: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ All: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ: before 5.19.6, from 6.0.0 before 6.2.5.\n\nUsers are recommended to upgrade to version 5.19.6 or 6.2.5, which fixes the issue."
      },
      {
        "lang": "es",
        "value": "Vulnerabilidad de validación de entrada incorrecta, control incorrecto de la generación de código (’Inyección de código’) en Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ.\n\nUn atacante autenticado puede eludir la corrección en CVE-2026-34197 añadiendo un conector que utiliza un transporte HTTP Discovery a través de BrokerView.addNetworkConnector o BrokerView.addConnector mediante Jolokia si el módulo activemq-http está en el classpath.\nUn endpoint HTTP malicioso puede devolver un transporte VM a través de la URI HTTP, lo que eludirá la validación añadida en CVE-2026-34197. El atacante puede entonces usar el parámetro brokerConfig del transporte VM para cargar un contexto de aplicación Spring XML remoto usando ResourceXmlApplicationContext.\nDebido a que ResourceXmlApplicationContext de Spring instancia todos los beans singleton antes de que BrokerService valide la configuración, se produce la ejecución de código arbitrario en la JVM del broker a través de métodos de fábrica de beans como Runtime.exec().\n\nEste problema afecta a Apache ActiveMQ Broker: anterior a 5.19.6, desde 6.0.0 anterior a 6.2.5; Apache ActiveMQ All: anterior a 5.19.6, desde 6.0.0 anterior a 6.2.5; Apache ActiveMQ: anterior a 5.19.6, desde 6.0.0 anterior a 6.2.5.\n\nSe recomienda a los usuarios actualizar a la versión 5.19.6 o 6.2.5, que corrige el problema."
      }
    ],
    "id": "CVE-2026-40466",
    "lastModified": "2026-10-26T22:10:00.163",
    "metrics": {
      "cvssMetricV31": [
        {
          "cvssData": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "exploitabilityScore": 2.8,
          "impactScore": 5.9,
          "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "type": "Secondary"
        },
        {
          "cvssData": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "exploitabilityScore": 2.8,
          "impactScore": 5.9,
          "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
          "type": "Secondary"
        }
      ],
      "ssvcV203": [
        {
          "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "ssvcData": {
            "id": "CVE-2026-40466",
            "options": [
              {
                "exploitation": "none"
              },
              {
                "automatable": "no"
              },
              {
                "technicalImpact": "total"
              }
            ],
            "role": "CISA Coordinator",
            "timestamp": "2026-04-24T00:00:00+00:00",
            "version": "2.0.3"
          }
        }
      ]
    },
    "published": "2026-04-24T11:16:22.540",
    "references": [
      {
        "source": "security@apache.org",
        "tags": [
          "Not Applicable"
        ],
        "url": "https://activemq.apache.org/security-advisories.data/CVE-2026-34197-announcement.txt"
      },
      {
        "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "url": "https://access.redhat.com/security/cve/CVE-2026-40466"
      },
      {
        "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2461410"
      },
      {
        "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40466.json"
      }
    ],
    "sourceIdentifier": "security@apache.org",
    "vulnStatus": "Modified",
    "weaknesses": [
      {
        "description": [
          {
            "lang": "en",
            "value": "CWE-20"
          },
          {
            "lang": "en",
            "value": "CWE-94"
          }
        ],
        "source": "security@apache.org",
        "type": "Secondary"
      },
      {
        "description": [
          {
            "lang": "en",
            "value": "CWE-94"
          }
        ],
        "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "type": "Secondary"
      }
    ]
  },
  "severity": "HIGH",
  "source": "nvd",
  "title": "Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ..."
}
Enrichment data
Nuclei templates
Aggregated bundle (all enrichments)
View JSON API Download JSON