{"answers":{"affected":"2 open source packages ship an affected version, including org.apache.activemq:artemis-core-client. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-4040 in the wild and no public exploit code.","fix":"Upgrade org.apache.activemq:artemis-core-client to 2.19.1 or later.","what":"CVE-2021-4040 is a medium-severity denial of service vulnerability in AMQ Broker, published on 24 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-4040 and fix it if it is affected.\n\nWhat it is: CVE-2021-4040 is a medium-severity denial of service vulnerability in AMQ Broker, published on 24 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-4040 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.apache.activemq:artemis-core-client (Maven): affected all versions; fixed in 2.19.1\n- org.apache.activemq:artemis-core-client (Maven): affected all versions; fixed in 2.19.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-4040/ (Markdown: https://insights.sbomify.com/CVE-2021-4040/index.md)","id":"CVE-2021-4040","markdown":"https://insights.sbomify.com/CVE-2021-4040/index.md","name":"CVE-2021-4040","record":{"aliases":["GHSA-gf8c-j759-86mg"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"AMQ Broker","requires_auth":"none","summary":"An attacker can cause a partial denial of service in AMQ Broker by sending maliciously crafted messages that trigger an out-of-memory condition.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"artemis","vendor":"apache"},{"product":"amq_broker","vendor":"redhat"}],"cvss":{"score":5.3,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"org.apache.activemq:artemis-core-client Vulnerable to Out-of-Bounds Write","id":"CVE-2021-4040","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"denial_of_service","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"ansible-runner vulnerable to shell command injection","id":"CVE-2021-4041"},"packages":[{"ecosystem":"Maven","fixed":["2.19.1"],"introduced":["0"],"last_affected":[],"package":"org.apache.activemq:artemis-core-client","purl":null,"source":"GHSA-gf8c-j759-86mg"},{"ecosystem":"Maven","fixed":["2.19.1"],"introduced":["0"],"last_affected":[],"package":"org.apache.activemq:artemis-core-client","purl":"pkg:maven/org.apache.activemq/artemis-core-client","source":"GHSA-gf8c-j759-86mg"}],"prev":{"headline":"Command injection in NWA1100-NH firmware","id":"CVE-2021-4039"},"products":["AMQ Broker"],"published":"2022-08-24","related":[{"cvss_score":9.8,"headline":"Apache Artemis, Apache ActiveMQ Artemis: Missing authentication on CORE protocol session reattachment","id":"CVE-2026-57967","kev_date_added":null,"published":"2026-09-10"},{"cvss_score":9.3,"headline":"Apache Artemis, Apache ActiveMQ Artemis: Auth bypass for Core downstream federation","id":"CVE-2026-27446","kev_date_added":null,"published":"2026-03-04"},{"cvss_score":9.1,"headline":"Information disclosure in Apache ActiveMQ Artemis","id":"CVE-2026-49364","kev_date_added":null,"published":"2026-09-10"},{"cvss_score":9.1,"headline":"Missing authorization in Apache ActiveMQ Artemis","id":"CVE-2026-67593","kev_date_added":null,"published":"2026-09-10"},{"cvss_score":8.8,"headline":"Apache ActiveMQ Artemis: Authenticated users could perform RCE via Jolokia MBeans","id":"CVE-2023-50780","kev_date_added":null,"published":"2024-10-14"},{"cvss_score":7.5,"headline":"Missing authorization in Apache ActiveMQ Artemis","id":"CVE-2026-49362","kev_date_added":null,"published":"2026-09-10"},{"cvss_score":7.5,"headline":"Information disclosure in Apache ActiveMQ Artemis","id":"CVE-2026-49363","kev_date_added":null,"published":"2026-09-10"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"An attacker can cause a partial denial of service in AMQ Broker by sending maliciously crafted messages that trigger an out-of-memory condition.","url":"https://insights.sbomify.com/CVE-2021-4040/"}