Skip to main content
Vulnerability Database/CVE-2026-67223

CVE-2026-67223: RabbitMQ LDAP Auth Bypass Vulnerability

CVE-2026-67223 is an authentication bypass flaw in RabbitMQ that exploits improper DN escaping in LDAP authentication, allowing attackers to manipulate bind operations. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-67223 Overview

CVE-2026-67223 is an LDAP Distinguished Name (DN) injection vulnerability in RabbitMQ's rabbitmq_auth_backend_ldap plugin. The fill/2 function substitutes ${username} into user_dn_pattern without applying RFC 4514 DN escaping. A crafted username can alter the resulting bind DN and potentially select a different directory entry than intended. Exploitation requires the LDAP backend to be configured with a user_dn_pattern containing ${username}, a directory layout where an injected suffix resolves to a usable entry, and valid credentials for that resulting DN. The weakness is classified as CWE-90: Improper Neutralization of Special Elements used in an LDAP Query.

Critical Impact

Authenticated LDAP bind redirection could allow a user to authenticate against a directory entry other than the one implied by their submitted username, undermining identity assumptions in downstream RabbitMQ authorization decisions.

Affected Products

  • RabbitMQ 3.13.x maintenance line
  • RabbitMQ 4.0.x, 4.1.x, and 4.2.x maintenance lines
  • RabbitMQ 4.3.x maintenance line (installations with rabbitmq_auth_backend_ldap enabled and user_dn_pattern containing ${username})

Discovery Timeline

  • 2026-09-25 - CVE-2026-67223 published to NVD
  • 2026-09-28 - Last updated in NVD database

Technical Details for CVE-2026-67223

Vulnerability Analysis

The RabbitMQ LDAP authentication backend builds a bind DN by filling a template string that typically looks like cn=${username},ou=users,dc=example,dc=com. The internal fill/2 helper performs textual substitution of ${username} with the raw value supplied by the connecting client. Because the substitution does not apply RFC 4514 escaping to characters that carry structural meaning in a DN, such as ,, +, =, \, <, >, ;, #, and leading or trailing spaces, an attacker-controlled username can break out of the intended attribute value and append or alter DN components.

For example, a username of alice,ou=admins substituted into the template above produces cn=alice,ou=admins,ou=users,dc=example,dc=com. If the directory contains a matching entry under ou=admins, the bind targets that entry instead of the intended one. The impact is bounded: the attacker must still present a password that is valid for the alternate DN, so this is an identity selection flaw rather than an authentication bypass.

Root Cause

The root cause is missing output encoding at a trust boundary. The fill/2 function treats template arguments as opaque strings and performs direct substring replacement into a DN string. RFC 4514 defines a specific escaping scheme for values embedded in DN attribute positions, and the pre-patch code did not apply it.

Attack Vector

The attack is remote and network-reachable through the normal RabbitMQ client authentication path (AMQP, management HTTP API, or any protocol routed through the LDAP backend). An attacker submits a crafted username containing DN metacharacters together with a password that matches the entry the manipulated DN resolves to. Successful exploitation depends on prior knowledge of the directory layout and on holding valid credentials for an alternate entry.

erlang
%% Pre-patch (vulnerable): raw substitution into DN template
evaluate0({exists, DNPattern}, Args, _User, LDAP) ->
    Filter = eldap:present("objectClass"),
    DN = fill(DNPattern, Args),
    R = object_exists(DN, Filter, LDAP),
    ?L1("evaluated exists for \"~ts\": ~tp", [DN, R]),
    R;

%% Post-patch: fill_dn/2 applies RFC 4514 escaping to substituted values
evaluate0({exists, DNPattern}, Args, _User, LDAP) ->
    Filter = eldap:present("objectClass"),
    DN = fill_dn(DNPattern, Args),
    R = object_exists(DN, Filter, LDAP),
    ?L1("evaluated exists for \"~ts\": ~tp", [DN, R]),
    R;

Source: RabbitMQ commit ad3ca47 and commit b54056e.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-67223

Indicators of Compromise

  • Authentication attempts where the submitted username contains DN metacharacters such as ,, =, +, \, <, >, ;, or #.
  • RabbitMQ authentication log entries showing bind DNs that do not match the configured user_dn_pattern structure for a given username.
  • Successful logins followed by activity under an identity that differs from the client-presented username.

Detection Strategies

  • Review rabbitmq_auth_backend_ldap debug logs (enable log_level for the plugin) and correlate the pre-fill username with the resulting bind DN.
  • Instrument the upstream LDAP server to log full bind DNs and alert on binds whose structure deviates from the expected user_dn_pattern.
  • Add server-side input validation at the application or load balancer layer to reject usernames containing DN special characters before they reach RabbitMQ.

Monitoring Recommendations

  • Forward RabbitMQ authentication logs and directory server bind logs into a central analytics pipeline and alert on anomalous DN components appearing in bind attempts.
  • Baseline the normal distribution of resulting bind DNs per application identity and flag outliers for review.

How to Mitigate CVE-2026-67223

Immediate Actions Required

  • Upgrade affected RabbitMQ nodes to a fixed release for the applicable maintenance line. The advisory contains conflicting first-fixed versions, so operators should consult the GitHub advisory and release notes directly before deploying.
  • If upgrade is not immediately possible, restrict the LDAP backend configuration to avoid substituting raw usernames into user_dn_pattern (for example, by using a dedicated search bind flow with validated attribute filters).
  • Enforce username character validation at the client authentication edge to reject DN metacharacters.

Patch Information

The fix introduces a new rabbit_ldap_rfc4514 module that applies RFC 4514 escaping to template substitution values via fill_dn/2, replacing the vulnerable direct call to fill/2 in rabbit_auth_backend_ldap.erl. The user_dn key is explicitly exempted from escaping because it already holds a complete DN. Fixed releases are published for the 4.2.x and 4.3.x lines as v4.2.9 and v4.3.3. The advisory body and structured metadata disagree on first-fixed versions for the 3.13, 4.0, and 4.1 lines; refer to GHSA-9x7r-g78c-5835 for authoritative guidance.

Workarounds

  • Disable rabbitmq_auth_backend_ldap or switch to a search-and-bind configuration that does not interpolate the raw username into a DN template.
  • Apply strict allow-list validation on usernames (for example, [a-zA-Z0-9._-]+) at every authentication entry point before credentials reach RabbitMQ.
  • Constrain the LDAP service account used by RabbitMQ to a narrow directory subtree so that injected DN suffixes cannot resolve to privileged entries.
bash
# Example: validate username format at an authenticating proxy before forwarding to RabbitMQ
if ! [[ "$USERNAME" =~ ^[a-zA-Z0-9._-]{1,64}$ ]]; then
  echo "Rejected username containing invalid characters" >&2
  exit 1
fi

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.