# CVE-2019-17572: Directory traversal in Apache RocketMQ

> An attacker can create directories outside the intended path by sending a malicious topic name, potentially leading to unauthorized file system modifications.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2020
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-5x3v-2gxr-59m2

## What is CVE-2019-17572?

CVE-2019-17572 is a medium-severity path traversal vulnerability in Apache RocketMQ, published on 14 May 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2019-17572?

2 open source packages ship an affected version, including org.apache.rocketmq:rocketmq-broker. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.rocketmq:rocketmq-broker` | Maven | From 4.2.0 | 4.6.1 |
| `org.apache.rocketmq:rocketmq-broker` | Maven | From 4.2.0 | 4.6.1 |

Products: Apache Rocketmq.

## How do I fix CVE-2019-17572?

Upgrade org.apache.rocketmq:rocketmq-broker to 4.6.1 or later.

## Is CVE-2019-17572 being exploited?

There is no known exploitation of CVE-2019-17572 in the wild and no public exploit code.

Public exploit code:

- https://github.com/shoucheng3/apache__rocketmq_CVE-2019-17572_4-6-0 (github_poc): https://github.com/shoucheng3/apache__rocketmq_CVE-2019-17572_4-6-0

## Other vulnerabilities in Apache RocketMQ

- [CVE-2023-33246](https://insights.sbomify.com/CVE-2023-33246/): Apache RocketMQ Command Execution (critical 9.8, exploited in the wild)
- [CVE-2023-37582](https://insights.sbomify.com/CVE-2023-37582/): Apache RocketMQ: Possible remote code execution when using the update configuration function (critical 9.8)
- [CVE-2024-23321](https://insights.sbomify.com/CVE-2024-23321/): Apache RocketMQ: Unauthorized Exposure of Sensitive Data (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-17572 and fix it if it is affected.

What it is: CVE-2019-17572 is a medium-severity path traversal vulnerability in Apache RocketMQ, published on 14 May 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-17572 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.rocketmq:rocketmq-broker (Maven): affected from 4.2.0; fixed in 4.6.1
- org.apache.rocketmq:rocketmq-broker (Maven): affected from 4.2.0; fixed in 4.6.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-17572/ (Markdown: https://insights.sbomify.com/CVE-2019-17572/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-17572
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-17572
- OSV: https://osv.dev/vulnerability/CVE-2019-17572

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-17572/
Summaries are generated and may contain mistakes; the official description above is the record.
