CVE-2021-32718 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in RabbitMQ management UI
An authenticated user with elevated permissions can execute arbitrary JavaScript in the RabbitMQ management UI via unsanitized user names.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-32718?
CVE-2021-32718 is a low-severity cross-site scripting vulnerability in rabbitmq-server, published on 28 Jun 2021. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Official description
RabbitMQ is a multi-protocol messaging broker. In rabbitmq-server prior to version 3.8.17, a new user being added via management UI could lead to the user's bane being rendered in a confirmation message without proper `<script>` tag sanitization, potentially allowing for JavaScript code execution in the context of the page. In order for this to occur, the user must be signed in and have elevated permissions (other user management). The vulnerability is patched in RabbitMQ 3.8.17. As a workaround, disable `rabbitmq_management` plugin and use CLI tools for management operations and Prometheus and Grafana for metrics and monitoring.
Which versions are affected by CVE-2021-32718?
1 open source package ship an affected version, including rabbitmq. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
rabbitmq Bitnami | All versions | 3.8.17 |
Linux distribution packages (1)
rabbitmq-server Red Hat:openstack:16.1::el8 | All versions | 0:3.7.23-9.el8ost |
Products include Vmware Rabbitmq.
How do I fix CVE-2021-32718?
Upgrade rabbitmq to 3.8.17 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2021-32718 being exploited?
There is no known exploitation of CVE-2021-32718 in the wild and no public exploit code.
Other vulnerabilities in rabbitmq-server
Sources
Also known as BIT-rabbitmq-2021-32718, DEBIAN-CVE-2021-32718, GHSA-c3hj-rg5h-2772, RHSA-2022:8867, UBUNTU-CVE-2021-32718.