CVE-2019-0222
Description
In Apache ActiveMQ 5.0.0 - 5.15.8, unmarshalling corrupt MQTT frame can lead to broker Out of Memory exception making it unresponsive.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Unmarshalling corrupt MQTT frames in Apache ActiveMQ 5.0.0–5.15.8 triggers an OutOfMemoryError, crashing the broker.
Vulnerability
A flaw in the MQTT protocol handling within Apache ActiveMQ versions 5.0.0 through 5.15.8 allows an attacker to send a specially crafted, corrupt MQTT frame. When the broker unmarshals this frame, an improper validation of the incoming data triggers an OutOfMemoryError, causing the broker to become unresponsive. The code path is reachable by any client that can establish an MQTT connection to the broker; no special configuration is required beyond enabling the MQTT transport connector [1][3].
Exploitation
An attacker needs network access to an ActiveMQ broker that accepts MQTT connections (the default port is 1883). No authentication or prior session is required. The attacker sends a single malformed MQTT frame. The broker’s unmarshalling logic, as seen in the fix [4], previously failed to properly validate the frame content, leading to excessive memory allocation. The attacker does not need elevated privileges or additional user interaction—the attack can be carried out in a single unauthenticated request [3].
Impact
A successful exploit results in a denial-of-service (DoS) condition. The ActiveMQ broker consumes all available heap memory and throws an OutOfMemoryError, which renders the broker unresponsive and unable to process legitimate messages. The impact is limited to availability; there is no evidence of information disclosure, data corruption, or remote code execution. The broker must be restarted to recover service [1][3].
Mitigation
Apache ActiveMQ 5.15.9, released on March 27, 2019, contains the fix for CVE-2019-0222 [3]. The fix upgrades the MQTT client library from version 1.14 to 1.15, which includes proper validation of frame data [4]. Users running any version from 5.0.0 through 5.15.8 should upgrade to 5.15.9 or later. As a workaround, administrators can disable the MQTT transport connector if it is not required. This vulnerability is not listed in CISA’s Known Exploited Vulnerabilities (KEV) catalog as of the publication date.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.apache.activemq:activemq-clientMaven | >= 5.0.0, < 5.15.9 | 5.15.9 |
Affected products
2- Apache/Apache ActiveMQv5Range: Apache ActiveMQ 5.0.0 - 5.15.8
Patches
2f78c0962ffb4AMQ-7166 - upgrade mqtt client library
2 files changed · +26 −1
activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTCodecTest.java+25 −0 modified@@ -19,7 +19,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import java.net.ProtocolException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; @@ -34,6 +36,7 @@ import org.fusesource.mqtt.codec.MQTTFrame; import org.fusesource.mqtt.codec.PUBLISH; import org.fusesource.mqtt.codec.SUBSCRIBE; +import org.fusesource.mqtt.codec.UNSUBSCRIBE; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; @@ -254,6 +257,28 @@ public void testMessageDecoding() throws Exception { assertEquals(MESSAGE_SIZE, publish.payload().length()); } + @Test + public void testMessageDecodingCorrupted() throws Exception { + UNSUBSCRIBE unsubscribe = new UNSUBSCRIBE(); + + MQTTFrame frame = unsubscribe.encode(); + + DataByteArrayOutputStream str = new DataByteArrayOutputStream(5); + str.write(new byte[] {0,0,0,0,0}); + + frame.buffers[0] = str.toBuffer(); + + boolean decodingFailed = false; + try { + unsubscribe.decode(frame); + } catch (ProtocolException pe) { + decodingFailed = true; + } + if (!decodingFailed) { + fail("Should have failed decoding the frame"); + } + } + @Test public void testMessageDecodingPerformance() throws Exception {
pom.xml+1 −1 modified@@ -97,7 +97,7 @@ <mockito-version>1.10.19</mockito-version> <owasp-dependency-check-version>3.3.0</owasp-dependency-check-version> <powermock-version>1.6.5</powermock-version> - <mqtt-client-version>1.14</mqtt-client-version> + <mqtt-client-version>1.15</mqtt-client-version> <openjpa-version>1.2.0</openjpa-version> <org-apache-derby-version>10.14.2.0</org-apache-derby-version> <org.osgi.core-version>4.3.1</org.osgi.core-version>
98b9f2eAMQ-7166 - upgrade mqtt client library
2 files changed · +26 −1
activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTCodecTest.java+25 −0 modified@@ -19,7 +19,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import java.net.ProtocolException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; @@ -34,6 +36,7 @@ import org.fusesource.mqtt.codec.MQTTFrame; import org.fusesource.mqtt.codec.PUBLISH; import org.fusesource.mqtt.codec.SUBSCRIBE; +import org.fusesource.mqtt.codec.UNSUBSCRIBE; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; @@ -254,6 +257,28 @@ public void testMessageDecoding() throws Exception { assertEquals(MESSAGE_SIZE, publish.payload().length()); } + @Test + public void testMessageDecodingCorrupted() throws Exception { + UNSUBSCRIBE unsubscribe = new UNSUBSCRIBE(); + + MQTTFrame frame = unsubscribe.encode(); + + DataByteArrayOutputStream str = new DataByteArrayOutputStream(5); + str.write(new byte[] {0,0,0,0,0}); + + frame.buffers[0] = str.toBuffer(); + + boolean decodingFailed = false; + try { + unsubscribe.decode(frame); + } catch (ProtocolException pe) { + decodingFailed = true; + } + if (!decodingFailed) { + fail("Should have failed decoding the frame"); + } + } + @Test public void testMessageDecodingPerformance() throws Exception {
pom.xml+1 −1 modified@@ -97,7 +97,7 @@ <mockito-version>1.10.19</mockito-version> <owasp-dependency-check-version>3.3.0</owasp-dependency-check-version> <powermock-version>1.6.5</powermock-version> - <mqtt-client-version>1.14</mqtt-client-version> + <mqtt-client-version>1.15</mqtt-client-version> <openjpa-version>1.2.0</openjpa-version> <org-apache-derby-version>10.14.2.0</org-apache-derby-version> <org.osgi.core-version>4.3.1</org.osgi.core-version>
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
35- github.com/advisories/GHSA-jpv3-g4cc-6vfxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-0222ghsaADVISORY
- activemq.apache.org/security-advisories.data/CVE-2019-0222-announcement.txtghsax_refsource_CONFIRMWEB
- www.openwall.com/lists/oss-security/2019/03/27/2ghsamailing-listx_refsource_MLISTWEB
- www.securityfocus.com/bid/107622mitrevdb-entryx_refsource_BID
- github.com/apache/activemq/commit/98b9f2eghsaWEB
- github.com/apache/activemq/commit/f78c0962ffb46fae3397eed6b7ec1e6e15045031ghsaWEB
- lists.apache.org/thread.html/03f91b1fb85686a848cee6b90112cf6059bd1b21b23bacaa11a962e1%40%3Cdev.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/03f91b1fb85686a848cee6b90112cf6059bd1b21b23bacaa11a962e1@%3Cdev.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/2b5c0039197a4949f29e1e2c9441ab38d242946b966f61c110808bcc%40%3Ccommits.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/2b5c0039197a4949f29e1e2c9441ab38d242946b966f61c110808bcc@%3Ccommits.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/71640324661c1b6d0b6708bd4fb20170e1b979370a4b8cddc4f8d485%40%3Cdev.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/71640324661c1b6d0b6708bd4fb20170e1b979370a4b8cddc4f8d485@%3Cdev.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/7da9636557118178b1690ba0af49c8a7b7b97d925218b5774622f488%40%3Cusers.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/7da9636557118178b1690ba0af49c8a7b7b97d925218b5774622f488@%3Cusers.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/a859563f05fbe7c31916b3178c2697165bd9bbf5a65d1cf62aef27d2%40%3Ccommits.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/a859563f05fbe7c31916b3178c2697165bd9bbf5a65d1cf62aef27d2@%3Ccommits.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/d1e334bd71d6e68462c62c726fe6db565c7a6283302f9c1feed087fa%40%3Ccommits.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/d1e334bd71d6e68462c62c726fe6db565c7a6283302f9c1feed087fa@%3Ccommits.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/fcbe6ad00f1de142148c20d813fae3765dc4274955e3e2f3ca19ff7b%40%3Cdev.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/fcbe6ad00f1de142148c20d813fae3765dc4274955e3e2f3ca19ff7b@%3Cdev.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/r946488fb942fd35c6a6e0359f52504a558ed438574a8f14d36d7dcd7%40%3Ccommits.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/r946488fb942fd35c6a6e0359f52504a558ed438574a8f14d36d7dcd7@%3Ccommits.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/rb698ed085f79e56146ca24ab359c9ef95846618675ea1ef402e04a6d%40%3Ccommits.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/rb698ed085f79e56146ca24ab359c9ef95846618675ea1ef402e04a6d@%3Ccommits.activemq.apache.org%3EghsaWEB
- lists.apache.org/thread.html/re4672802b0e5ed67c08c9e77057d52138e062f77cc09581b723cf95a%40%3Ccommits.activemq.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/re4672802b0e5ed67c08c9e77057d52138e062f77cc09581b723cf95a@%3Ccommits.activemq.apache.org%3EghsaWEB
- lists.debian.org/debian-lts-announce/2021/03/msg00004.htmlghsamailing-listx_refsource_MLISTWEB
- lists.debian.org/debian-lts-announce/2021/03/msg00005.htmlghsamailing-listx_refsource_MLISTWEB
- security.netapp.com/advisory/ntap-20190502-0006ghsaWEB
- security.netapp.com/advisory/ntap-20190502-0006/mitrex_refsource_CONFIRM
- web.archive.org/web/20190404065432/http://www.securityfocus.com/bid/107622ghsaWEB
- www.oracle.com/security-alerts/cpuapr2020.htmlghsax_refsource_MISCWEB
- www.oracle.com/security-alerts/cpujul2020.htmlghsax_refsource_MISCWEB
- www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.