Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-33246 PoC — Apache RocketMQ: Possible remote code execution vulnerability when using the update configuration function

Source
Associated Vulnerability
Title:Apache RocketMQ: Possible remote code execution vulnerability when using the update configuration function (CVE-2023-33246)
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 .
Readme
# CVE-2023-33246-mitigation

This project is a Maven-based demonstration of mitigating CVE-2023-33246, a vulnerability in Apache RocketMQ.

## Project Structure

- `org/example/Main.java`: The main program file.
- `org/apache/rocketmq/common/BrokerConfig.java`: Modified version of the official RocketMQ 4.9.5 source code.

## Main Features

1. **Attack Testing**: The `updateConfig` method in `Main.java` is used for attack testing purposes.

2. **Enhanced Validation**: The `BrokerConfig.java` file includes a new method `getValidatedRocketmqHome()`. This method strengthens the validation of the `RocketmqHome` parameter to prevent potential attacks.

## Base Source Code

This project is based on Apache RocketMQ 4.9.5. The complete official source code can be downloaded from:

[RocketMQ 4.9.5 Source Release](https://dist.apache.org/repos/dist/release/rocketmq/4.9.5/rocketmq-all-4.9.5-source-release.zip)
File Snapshot

[4.0K] /data/pocs/b0bf4bc1dc26d4ea5f434d65b822528b5e7caea4 ├── [1.0K] pom.xml ├── [ 912] README.md └── [4.0K] src └── [4.0K] main └── [4.0K] java └── [4.0K] org ├── [4.0K] apache │   └── [4.0K] rocketmq │   └── [4.0K] common │   └── [ 27K] BrokerConfig.java └── [4.0K] example └── [2.5K] Main.java 8 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →