CVE-2025-27533: Apache ActiveMQ Unchecked Buffer Length Can Cause Vulnerability

MODERATE
Advisory Identifier: GHSA-whxr-3p84-rf3c
CVSS 7.5
CWE-789
Published
Advisory Summary

CVE-2025-27533 is a MODERATE (CVSS 7.5) unchecked buffer length can cause vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Apache ActiveMQ libraries in the Maven ecosystem. The issue involves unchecked buffer length can cause excessive memory allocation. Remediation is available by upgrading affected packages to version 5.16.8, 5.17.7, 5.18.7, 6.1.6.

CVE-2025-27533 at a Glance

CVE Identifier CVE-2025-27533
GHSA Identifier GHSA-whxr-3p84-rf3c
Severity MODERATE
CVSS v3.1 Base Score 7.5
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Apache ActiveMQ
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2025-27533

To remediate this vulnerability, upgrade all affected Apache ActiveMQ dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.activemq:activemq-openwire-legacy fixed: 5.16.8
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-openwire-legacy</artifactId>
    <version>5.16.8</version>
</dependency>
org.apache.activemq:activemq-client fixed: 5.16.8
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-client</artifactId>
    <version>5.16.8</version>
</dependency>
org.apache.activemq:activemq-openwire-legacy fixed: 5.17.7
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-openwire-legacy</artifactId>
    <version>5.17.7</version>
</dependency>
org.apache.activemq:activemq-openwire-legacy fixed: 5.18.7
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-openwire-legacy</artifactId>
    <version>5.18.7</version>
</dependency>
org.apache.activemq:activemq-openwire-legacy fixed: 6.1.6
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-openwire-legacy</artifactId>
    <version>6.1.6</version>
</dependency>
org.apache.activemq:activemq-client fixed: 5.17.7
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-client</artifactId>
    <version>5.17.7</version>
</dependency>
org.apache.activemq:activemq-client fixed: 5.18.7
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-client</artifactId>
    <version>5.18.7</version>
</dependency>
org.apache.activemq:activemq-client fixed: 6.1.6
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-client</artifactId>
    <version>6.1.6</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.activemq

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-27533, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.activemq

Analyze the terminal output to locate any version of Apache ActiveMQ in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.16.8), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.activemq command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Apache ActiveMQ, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Memory Allocation with Excessive Size Value vulnerability in Apache ActiveMQ. During unmarshalling of OpenWire commands the size value of buffers was not properly validated which could lead to excessive memory allocation and be exploited to cause a denial of service (DoS) by depleting process memory, thereby affecting applications and services that rely on the availability of the ActiveMQ broker when not using mutual TLS connections. This issue affects Apache ActiveMQ: from 6.0.0 before 6.1.6, from 5.18.0 before 5.18.7, from 5.17.0 before 5.17.7, before 5.16.8. ActiveMQ 5.19.0 is not affected. Users are recommended to upgrade to version 6.1.6+, 5.19.0+, 5.18.7+, 5.17.7, or 5.16.8 or which fixes the issue. Existing users may implement mutual TLS to mitigate the risk on affected brokers.

CVE-2025-27533 Affected Apache ActiveMQ Versions

8 component(s)
Fixed Versions:
5.16.85.17.75.18.76.1.6
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.activemq:activemq-openwire-legacy
Maven
< 5.16.8
5.16.8
org.apache.activemq:activemq-client
Maven
< 5.16.8
5.16.8
org.apache.activemq:activemq-openwire-legacy
Maven
≥ 5.17.0
< 5.17.7
5.17.7
org.apache.activemq:activemq-openwire-legacy
Maven
≥ 5.18.0
< 5.18.7
5.18.7
org.apache.activemq:activemq-openwire-legacy
Maven
≥ 6.0.0
< 6.1.6
6.1.6
org.apache.activemq:activemq-client
Maven
≥ 5.17.0
< 5.17.7
5.17.7
org.apache.activemq:activemq-client
Maven
≥ 5.18.0
< 5.18.7
5.18.7
org.apache.activemq:activemq-client
Maven
≥ 6.0.0
< 6.1.6
6.1.6

References

Frequently Asked Questions

What is CVE-2025-27533?
CVE-2025-27533 is a security vulnerability in Apache ActiveMQ involving Unchecked buffer length can cause excessive memory allocation under CWE-789: Memory Allocation with Excessive Size Value.
Which Apache ActiveMQ versions are affected?
Affected versions include releases prior to 5.16.8, 5.17.7, 5.18.7, 6.1.6 across affected packages: org.apache.activemq:activemq-openwire-legacy, org.apache.activemq:activemq-client.
What version fixes CVE-2025-27533?
Upgrading to 5.16.8, 5.17.7, 5.18.7, 6.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is activemq-openwire-legacy affected?
Yes, org.apache.activemq:activemq-openwire-legacy is affected in releases prior to 5.16.8, 5.17.7, 5.18.7, 6.1.6. Upgrade your dependency to 5.16.8, 5.17.7, 5.18.7, 6.1.6 or later.
Is activemq-client affected?
Yes, org.apache.activemq:activemq-client is affected in releases prior to 5.16.8, 5.17.7, 5.18.7, 6.1.6. Upgrade your dependency to 5.16.8, 5.17.7, 5.18.7, 6.1.6 or later.
What is the CVSS score of CVE-2025-27533?
CVE-2025-27533 has a CVSS v3.1 base score of 7.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2025-27533?
CVE-2025-27533 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check Maven dependencies for CVE-2025-27533?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.activemq'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-whxr-3p84-rf3c",
  "modified" : "2025-11-03T21:33:47Z",
  "published" : "2025-05-07T09:31:19Z",
  "aliases" : [ "CVE-2025-27533" ],
  "summary" : "Apache ActiveMQ: Unchecked buffer length can cause excessive memory allocation",
  "details" : "Memory Allocation with Excessive Size Value vulnerability in Apache ActiveMQ.\n\nDuring unmarshalling of OpenWire commands the size value of buffers was not properly validated which could lead to excessive memory allocation and be exploited to cause a denial of service (DoS) by depleting process memory, thereby affecting applications and services that rely on the availability of the ActiveMQ broker when not using mutual TLS connections.\nThis issue affects Apache ActiveMQ: from 6.0.0 before 6.1.6, from 5.18.0 before 5.18.7, from 5.17.0 before 5.17.7, before 5.16.8. ActiveMQ 5.19.0 is not affected.\n\nUsers are recommended to upgrade to version 6.1.6+, 5.19.0+,  5.18.7+, 5.17.7, or 5.16.8 or which fixes the issue.\n\nExisting users may implement mutual TLS to mitigate the risk on affected brokers.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/AU:Y/R:A/V:D/RE:M/U:Red"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-openwire-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.16.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.16.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-openwire-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.17.0"
      }, {
        "fixed" : "5.17.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-openwire-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.18.0"
      }, {
        "fixed" : "5.18.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-openwire-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.1.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.17.0"
      }, {
        "fixed" : "5.17.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.18.0"
      }, {
        "fixed" : "5.18.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27533"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/activemq/commit/fc4372b9f0f72b8b5eed917f0019c5cea45c5d06"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/activemq"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/AMQ-6596"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/8hcm25vf7mchg4zbbhnlx2lc5bs705hg"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/06/msg00020.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/05/06/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-07T15:25:41Z",
    "nvd_published_at" : "2025-05-07T09:15:18Z"
  }
}