CVE-2021-4040
Java vulnerability analysis and mitigation

Overview

A critical vulnerability (CVE-2021-4040) was discovered in AMQ Broker that could cause a partial interruption to the broker's availability through an Out of Memory (OOM) condition. The vulnerability affects AMQ Broker versions up to (excluding) 7.10.0 and Apache ActiveMQ Artemis versions up to (excluding) 2.19.1. The flaw was discovered in late 2021 and allows attackers to disrupt service availability through maliciously crafted messages (NVD, Red Hat Advisory).

Technical details

The vulnerability stems from improper handling of XID parsing in the broker, which could lead to an Out-of-bounds Write condition. The issue occurs when a 32-bit integer is read from the stream and a byte array is allocated using this value without performing proper checks, potentially leading to uncontrolled resource consumption. The vulnerability has been assigned a CVSS v3.1 base score of 5.3 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (NVD, ARTEMIS-3593).

Impact

The primary impact of this vulnerability is on system availability. When exploited, the flaw allows attackers to cause a partial disruption of service through uncontrolled resource consumption, specifically leading to an Out of Memory (OOM) condition in the AMQ Broker. The highest threat from this vulnerability is to system availability, with no direct impact on confidentiality or integrity (NVD, Red Hat Bugzilla).

Mitigation and workarounds

The vulnerability has been fixed in AMQ Broker version 7.10.0 and Apache ActiveMQ Artemis version 2.19.1. Users are advised to upgrade to these versions or later to mitigate the vulnerability. The fix includes implementing proper checks during XID parsing to prevent uncontrolled resource consumption (Red Hat Advisory, Artemis Commit).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-14306CRITICAL10
  • JavaJava
  • net.sf.robocode:robocode.core
NoYesDec 09, 2025
CVE-2025-14307CRITICAL9.3
  • JavaJava
  • net.sf.robocode:robocode.battle
NoYesDec 09, 2025
CVE-2025-66566HIGH8.2
  • JavaJava
  • at.yawk.lz4:lz4-java
NoYesDec 05, 2025
CVE-2025-66623HIGH7.4
  • JavaJava
  • io.strimzi:strimzi
NoYesDec 05, 2025
GHSA-93fv-4pm9-xp28MEDIUM6.9
  • JavaJava
  • net.dv8tion:jda
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management