Vulnerabilities in pkg:maven/org.apache.rocketmq/rocketmq-broker

PACKAGE
Advisory Identifier: GHSA-x3cq-8f32-5f63
Advisory Summary

CVE-2023-33246 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Rocketmq broker libraries in the Maven ecosystem. The issue involves apache rocketmq may have remote code execution vulnerability when using update configuration function. Remediation is available by upgrading affected packages to version 5.1.1, 4.9.6.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.rocketmq/rocketmq-broker

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.rocketmq/rocketmq-broker. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x3cq-8f32-5f63 CVE-2023-33246 CRITICAL Apache RocketMQ may have remote code execution vulnerability when using update configuration function
GHSA-5x3v-2gxr-59m2 CVE-2019-17572 MODERATE Directory traversal in Apache RocketMQ

CVE-2023-33246 at a Glance

CVE Identifier CVE-2023-33246
GHSA Identifier GHSA-x3cq-8f32-5f63
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Rocketmq broker
Package Ecosystem Maven
Published Date
Last Updated

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/E:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-33246

To remediate this vulnerability, upgrade all affected Rocketmq broker dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.rocketmq:rocketmq-broker fixed: 5.1.1
<dependency>
    <groupId>org.apache.rocketmq</groupId>
    <artifactId>rocketmq-broker</artifactId>
    <version>5.1.1</version>
</dependency>
org.apache.rocketmq:rocketmq-namesrv fixed: 4.9.6
<dependency>
    <groupId>org.apache.rocketmq</groupId>
    <artifactId>rocketmq-namesrv</artifactId>
    <version>4.9.6</version>
</dependency>
org.apache.rocketmq:rocketmq-controller fixed: 5.1.1
<dependency>
    <groupId>org.apache.rocketmq</groupId>
    <artifactId>rocketmq-controller</artifactId>
    <version>5.1.1</version>
</dependency>
org.apache.rocketmq:rocketmq-namesrv fixed: 5.1.1
<dependency>
    <groupId>org.apache.rocketmq</groupId>
    <artifactId>rocketmq-namesrv</artifactId>
    <version>5.1.1</version>
</dependency>
Verify Direct and Transitive Dependencies

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-33246, 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 broker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.1.1), 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 broker, 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

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 .

CVE-2023-33246 Affected Rocketmq broker Versions

4 component(s)
Fixed Versions:
5.1.14.9.6
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.rocketmq:rocketmq-broker
Maven
≥ 5.0.0
< 5.1.1
5.1.1
org.apache.rocketmq:rocketmq-namesrv
Maven
≥ 4.0.0
< 4.9.6
4.9.6
org.apache.rocketmq:rocketmq-controller
Maven
≥ 5.0.0
< 5.1.1
5.1.1
org.apache.rocketmq:rocketmq-namesrv
Maven
≥ 5.0.0
< 5.1.1
5.1.1

References

Frequently Asked Questions

What is CVE-2023-33246?
CVE-2023-33246 is a security vulnerability in Rocketmq broker involving Apache RocketMQ may have remote code execution vulnerability when using update configuration function under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Rocketmq broker versions are affected?
Affected versions include releases prior to 5.1.1, 4.9.6 across affected packages: org.apache.rocketmq:rocketmq-broker, org.apache.rocketmq:rocketmq-namesrv, org.apache.rocketmq:rocketmq-controller.
What version fixes CVE-2023-33246?
Upgrading to 5.1.1, 4.9.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rocketmq-broker affected?
Yes, org.apache.rocketmq:rocketmq-broker is affected in releases prior to 5.1.1. Upgrade your dependency to 5.1.1 or later.
Is rocketmq-namesrv affected?
Yes, org.apache.rocketmq:rocketmq-namesrv is affected in releases prior to 4.9.6, 5.1.1. Upgrade your dependency to 4.9.6, 5.1.1 or later.
What is the CVSS score of CVE-2023-33246?
CVE-2023-33246 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H.
What CWE is associated with CVE-2023-33246?
CVE-2023-33246 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (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.).
How can I check Maven dependencies for CVE-2023-33246?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.rocketmq'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x3cq-8f32-5f63",
  "modified" : "2025-10-22T19:21:22Z",
  "published" : "2023-07-06T21:15:04Z",
  "aliases" : [ "CVE-2023-33246" ],
  "summary" : "Apache RocketMQ may have remote code execution vulnerability when using update configuration function",
  "details" : "For RocketMQ versions 5.1.0 and below, under certain conditions, there is a risk of remote command execution. \n\nSeveral 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. \n\nTo 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 .",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.rocketmq:rocketmq-broker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.rocketmq:rocketmq-namesrv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.9.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.rocketmq:rocketmq-controller"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.rocketmq:rocketmq-namesrv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-33246"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/rocketmq/commit/9d411cf04a695e7a3f41036e8377b0aa544d754d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/rocketmq/commit/c3ada731405c5990c36bf58d50b3e61965300703"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Malayke/CVE-2023-33246_RocketMQ_RCE_EXPLOIT"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/rocketmq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jakabakos/CVE-2023-33246_Apache_RocketMQ_RCE"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/1s8j2c8kogthtpv3060yddk03zq0pxyp"
  }, {
    "type" : "WEB",
    "url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-33246"
  }, {
    "type" : "WEB",
    "url" : "https://www.vicarius.io/vsociety/posts/rocketmq-rce-cve-2023-33246-33247"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/173339/Apache-RocketMQ-5.1.0-Arbitrary-Code-Injection.html"
  }, {
    "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-06T23:48:22Z",
    "nvd_published_at" : "2023-05-24T15:15:09Z"
  }
}