Directory traversal in Apache RocketMQGHSA-5x3v-2gxr-59m2
Fix: apache/rocketmq@f8f6fbeGHSA-5x3v-2gxr-59m2 is a Path Traversal vulnerability in org.apache.rocketmq:rocketmq-broker. A fix is available for org.apache.rocketmq:rocketmq-broker — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
org.apache.rocketmq:rocketmq-brokerReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
In Apache RocketMQ 4.2.0 to 4.6.0, when the automatic topic creation in the broker is turned on by default, an evil topic like “../../../../topic2020” is sent from rocketmq-client to the broker, a topic folder will be created in the parent directory in brokers, which leads to a directory traversal vulnerability. Users of the affected versions should apply one of the following: Upgrade to Apache RocketMQ 4.6.1 or later.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.rocketmq:rocketmq-broker | ≥ 4.2.0&&< 4.6.1 | 4.6.1org.apache.rocketmq:rocketmq-broker:4.6.1 |
Affected Products
rocketmqapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.rocketmq:rocketmq-broker, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.rocketmq:rocketmq-broker to 4.6.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5x3v-2gxr-59m2 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is GHSA-5x3v-2gxr-59m2 in your dependencies?
Find it across Maven, including transitive dependencies.