Apache RocketMQ may have remote code execution vulnerability when using update configuration function

Description

For RocketMQ versions 5.1.0 and below, under certain conditions, there is a risk of remote command execution. 

Several components of RocketMQ, including NameServer, Broker, and Controller, are leaked on the extranet and lack permission verification, an attacker can exploit this vulnerability by using the update configuration function to execute commands as the system users that RocketMQ is running as. Additionally, an attacker can achieve the same effect by forging the RocketMQ protocol content. 

To prevent these attacks, users are recommended to upgrade to version 5.1.1 or above for using RocketMQ 5.x or 4.9.6 or above for using RocketMQ 4.x .

Basic information

Type
reviewed
Severity
critical
Advisory on GitHub
Open advisory ↗
Repository advisory
Source code
Browse source ↗
Published (advisory)
2023-07-06 21:15:04 UTC
Updated
2025-10-22 19:21:24 UTC
GitHub reviewed
2023-07-06 23:48:22 UTC
NVD published
2023-05-24

EPSS Score

Score Percentile
94.39% 99.97%

CVSS Scores

Base score Version Severity Vector
9.8 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
Exploit maturity (E:H)
Exploits are easy to find or already weaponized—assume people are using them.

Identifiers

CWEs

CWE id Name
CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected packages (4)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
maven org.apache.rocketmq:rocketmq-broker >= 5.0.0, < 5.1.1 5.1.1
maven org.apache.rocketmq:rocketmq-namesrv >= 4.0.0, < 4.9.6 4.9.6
maven org.apache.rocketmq:rocketmq-controller >= 5.0.0, < 5.1.1 5.1.1
maven org.apache.rocketmq:rocketmq-namesrv >= 5.0.0, < 5.1.1 5.1.1

References

cvelogic Threat Intelligence