Executive brief
Apache ActiveMQ Artemis is a high-performance message broker used to facilitate communication between different software applications. A vulnerability in how it handles incoming data packets allows an attacker to crash the service by forcing it to consume excessive amounts of memory. This can lead to a denial-of-service (DoS) condition, disrupting business operations and message delivery.
Technical details
A vulnerability exists in Apache ActiveMQ Artemis (specifically within the artemis-core-client and XidCodecSupport) due to improper validation of user-supplied lengths during memory allocation. An unauthenticated remote attacker can send a handcrafted packet with a large 'claimed size' value for XID data. The application attempts to allocate a byte array based on this value without sufficient boundary checks against the actual buffer capacity, leading to an OutOfMemoryError (OOM) and subsequent JVM crash. This issue is addressed in versions 2.19.1 and 2.20.0 by implementing defensive checks in the safeReadBytes method.
Affected products
- Apache ActiveMQ Artemis < 2.19.1, < 2.20.0
Timeline
- 2022-02-04: advisory: NVD published CVE-2022-23913
- 2022-02-06: advisory: GitHub Advisory published
- 2021-12-03: patched: Fix merged into main branch
References
- https://lists.apache.org/thread/fjynj57rd99s814rdn5hzvmx8lz403q2
- https://github.com/apache/activemq-artemis/pull/3862
- https://github.com/apache/activemq-artemis/pull/3862/commits/1f92368240229b8f5db92a92a72c703faf83e9b7
- https://github.com/apache/activemq-artemis/pull/3871
- https://github.com/apache/activemq-artemis/pull/3871/commits/153d2e9a979aead8dff95fbc91d659ecc7d0fb82