# CVE-2021-32719: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in RabbitMQ federation management plugin

> An attacker with elevated permissions can execute arbitrary JavaScript in the RabbitMQ management UI via unsanitized consumer tags in federation links.

- **Severity:** Low 3.1 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:N`)
- **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:** Yes
- **Published:** 28 Jun 2021
- **Updated:** 3 Aug 2024
- **Also known as:** BIT-rabbitmq-2021-32719, CLEANSTART-2026-IO65038, DEBIAN-CVE-2021-32719, GHSA-5452-hxj4-773x, UBUNTU-CVE-2021-32719

## What is CVE-2021-32719?

CVE-2021-32719 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.18, when a federation link was displayed in the RabbitMQ management UI via the `rabbitmq_federation_management` plugin, its consumer tag was rendered without proper <script> tag sanitization. This potentially allows for JavaScript code execution in the context of the page. The user must be signed in and have elevated permissions (manage federation upstreams and policies) for this to occur. The vulnerability is patched in RabbitMQ 3.8.18. As a workaround, disable the `rabbitmq_federation_management` plugin and use [CLI tools](https://www.rabbitmq.com/cli.html) instead.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page)

## Which versions are affected by CVE-2021-32719?

1 open source package ship an affected version, including rabbitmq. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rabbitmq` | Bitnami | All versions | 3.8.18 |

Products: Vmware Rabbitmq.

## How do I fix CVE-2021-32719?

Upgrade rabbitmq to 3.8.18 or later.

## Is CVE-2021-32719 being exploited?

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

## Other vulnerabilities in rabbitmq-server

- [CVE-2023-46118](https://insights.sbomify.com/CVE-2023-46118/): Denial of Service by publishing large messages over the HTTP API (medium 4.9)
- [CVE-2021-32718](https://insights.sbomify.com/CVE-2021-32718/): Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in RabbitMQ management UI (low 3.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-32719 and fix it if it is affected.

What it is: CVE-2021-32719 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.
Exploitation: There is no known exploitation of CVE-2021-32719 in the wild and no public exploit code.

Affected packages and fixed versions:
- rabbitmq (Bitnami): affected all versions; fixed in 3.8.18

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-2021-32719/ (Markdown: https://insights.sbomify.com/CVE-2021-32719/index.md)
```

## Sources

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

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