CVE-2021-4040 is a medium-severity (CVSS 5.3) Uncontrolled Resource Consumption vulnerability in org.apache.activemq:artemis-core-client. A fix is available for org.apache.activemq:artemis-core-client — see the affected versions and patch details below.
org.apache.activemq:artemis-core-client Vulnerable to Out-of-Bounds Write
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.apache.activemq:artemis-core-clientReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
A flaw was found in AMQ Broker. This issue can cause a partial interruption to the availability of AMQ Broker via an Out of memory (OOM) condition. This flaw allows an attacker to partially disrupt availability to the broker through a sustained attack of maliciously crafted messages. The highest threat from this vulnerability is system availability.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.activemq:artemis-core-client | all versions | 2.19.1org.apache.activemq:artemis-core-client:2.19.1 |
Affected Products
artemisapacheamq brokerredhatDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.activemq:artemis-core-client, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.activemq:artemis-core-client to 2.19.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-4040 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat AMQ 7.10.0 | broker | RHSA-2022:5101 |
Frequently Asked Questions
Is CVE-2021-4040 in your dependencies?
Find it across Maven, including transitive dependencies.