CVE-2023-37582: Rocketmq namesrv RocketMQ NameServer Component Code Injection Vulnerability
CRITICALCVE-2023-37582 is a CRITICAL (CVSS 9.8) rocketmq nameserver component code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Rocketmq namesrv libraries in the Maven ecosystem. The issue involves rocketmq nameserver component code injection vulnerability. Remediation is available by upgrading affected packages to version 4.9.7, 5.1.2.
CVE-2023-37582 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-37582
To remediate this vulnerability, upgrade all affected Rocketmq namesrv dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-namesrv</artifactId>
<version>4.9.7</version>
</dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-namesrv</artifactId>
<version>5.1.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.rocketmq
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-37582, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.rocketmq
Analyze the terminal output to locate any version of Rocketmq namesrv in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.7), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.rocketmq command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Rocketmq namesrv, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-37582 Affected Rocketmq namesrv Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.rocketmq:rocketmq-namesrv
|
Maven |
< 4.9.7
|
4.9.7
|
|
org.apache.rocketmq:rocketmq-namesrv
|
Maven |
≥ 5.0.0
< 5.1.2
|
5.1.2
|
References
Frequently Asked Questions
What is CVE-2023-37582?
Which Rocketmq namesrv versions are affected?
What version fixes CVE-2023-37582?
Is rocketmq-namesrv affected?
What is the CVSS score of CVE-2023-37582?
What CWE is associated with CVE-2023-37582?
How can I check Maven dependencies for CVE-2023-37582?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gpq8-963w-8qc9",
"modified" : "2025-02-13T19:00:52Z",
"published" : "2023-07-12T12:31:36Z",
"aliases" : [ "CVE-2023-37582" ],
"summary" : "RocketMQ NameServer component Code Injection vulnerability",
"details" : "The RocketMQ NameServer component still has a remote command execution vulnerability as the CVE-2023-33246 issue was not completely fixed in version 5.1.1. \n\nWhen NameServer address are leaked on the extranet and lack permission verification, an attacker can exploit this vulnerability by using the update configuration function on the NameServer component to execute commands as the system users that RocketMQ is running as. \n\nIt is recommended for users to upgrade their NameServer version to 5.1.2 or above for RocketMQ 5.x or 4.9.7 or above for RocketMQ 4.x to prevent these attacks.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.rocketmq:rocketmq-namesrv"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.9.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.rocketmq:rocketmq-namesrv"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37582"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/rocketmq"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/m614czxtpvlztd7mfgcs2xcsg36rdbnc"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2023/07/12/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-12T17:30:39Z",
"nvd_published_at" : "2023-07-12T10:15:11Z"
}
}