A graphic featuring the text "meshIQ®" in a modern font. The design emphasizes clean lines and a minimalist aesthetic, suitable for branding or logo use.

CVE-2021-26117: Apache ActiveMQ® LDAP Authentication Bypass

meshIQ November 17, 2026

CVE-2021-26117 is an LDAP authentication bypass in the Apache ActiveMQ® LDAP login module. If the module was set up to talk to the directory anonymously, it checked that a username existed but never checked the password. Anyone who knew, or guessed, a valid username could connect to the broker as that user.

It was fixed in 2021. It still matters because the setting that triggers it lives in a configuration file that upgrades don’t touch, on brokers that have often outlived the people who configured them. This post is part of our Apache ActiveMQ® CVE Guide.

CVE-2021-26117 at a glance

DetailValue
Title (Apache)LDAP-Authentication does not verify passwords on servers with anonymous bind
WeaknessCWE-287, improper authentication
CVSS7.5 High (NIST, CVSS 3.1, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N)
AffectedApache ActiveMQ® before 5.15.14 and 5.16.1; Apache Artemis™ before 2.16.0
Fixed in5.15.14, 5.16.1 (and 5.17.0 onward); Apache Artemis™ 2.16.0
PublishedNVD, 27 January 2021
CreditGregor Tudan
ExploitedNo public reports; not in the CISA KEV catalog

Sources: Apache advisory, NVD, AMQ-8035, ARTEMIS-2895.

The advisory gives no lower bound (“prior to”), while NVD’s version ranges start at 5.15.0. Treat earlier versions as affected too. NVD also lists Oracle and NetApp products that bundled vulnerable Apache ActiveMQ® releases, so check vendor appliances, not just brokers you installed yourself.

How the LDAP authentication bypass works

The Apache ActiveMQ® LDAPLoginModule logs a user in with three steps:

  1. Connect to the directory using the configured connectionUsername, connectionPassword and authentication mode.
  2. Search userBase for the username and find the user’s distinguished name (DN).
  3. Bind to the directory as that DN with the password the client supplied. If the bind succeeds, the password is correct.

Step 3 is the password check. Before the fix, it reused whatever authentication mode the module was configured with. If that mode was none, an anonymous connection, the “bind as the user” was also anonymous. An anonymous bind succeeds without a password, so step 3 always passed. In Apache’s words, the anonymous context was used to verify the password “in error, resulting in no check on the password”.

The fix, committed in September 2020, is two lines. It forces a simple (username and password) bind for the password check, then restores the configured mode for role lookups:

context.addToEnvironment(Context.SECURITY_AUTHENTICATION, "simple");
context.addToEnvironment(Context.SECURITY_PRINCIPAL, dn);
context.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
// ... bind, then:
context.addToEnvironment(Context.SECURITY_AUTHENTICATION, getLDAPPropertyValue(AUTHENTICATION));

Apache Artemis™ received the same change under ARTEMIS-2895. No new option was added, so there is nothing to switch on: the upgrade alone closes the bypass.

Why insecure LDAP configuration still turns up

The vulnerable LDAP configuration looks harmless. A typical example:

None
activemq-ldap {
    org.apache.activemq.jaas.LDAPLoginModule required
        connectionURL="ldap://ldap.example.com:389"
        connectionUsername=none
        connectionPassword=none
        authentication=none
        userBase="ou=People,dc=example,dc=com"
        userSearchMatching="(uid={0})"
        roleBase="ou=Groups,dc=example,dc=com"
        roleName=cn
        roleSearchMatching="(member={0})"
        ;
};

Someone wanted to avoid storing a directory password on the broker, and the directory allowed anonymous reads. Three things keep that choice alive:

Upgrades keep conf/. 

In-place upgrades usually carry login.config forward unchanged. The binary gets the fix but the setting stays, so a rollback, an old VM image or a vendor appliance with an older Apache ActiveMQ® brings the bypass straight back.

The directory allows it. 

OpenLDAP enables anonymous bind by default. Active Directory, by contrast, blocks most anonymous operations by default, so this setup is more common against OpenLDAP and similar directories.

Nobody owns it. 

Middleware configs in long-lived estates often have no current owner. The settings work, so nobody reads them.

The other trap: empty passwords

RFC 4513 defines an “unauthenticated” bind: a DN with an empty password. The RFC recommends that servers refuse these by default, but notes that servers may return success for them, and that clients using bind results for authorization “should actively detect unauthenticated Bind requests”. If a directory allows unauthenticated binds, a login module that passes an empty password straight through lets anyone in as any user.

This is a separate issue from CVE-2021-26117. Apache first published an advisory about empty passwords in the LDAP login module in 2014 (CVE-2014-3612, fixed in 5.10.1). Apache Artemis™ has rejected empty LDAP passwords since 2.6.3. In Apache ActiveMQ®, an explicit empty-password check in the user bind arrived only with the LDAP hardening in 5.19.12, 6.3.3 and 6.4.0, released on 27 October 2026, without a CVE. Its code comment explains why: an empty password “is not a valid credential”, and some directories “would accept [it] as anonymous”.

OpenLDAP disables unauthenticated binds by default, so most directories are safe. But if yours allows them, an older Apache ActiveMQ® broker relies on the directory alone to refuse empty passwords.

Inherited an Apache ActiveMQ® estate nobody fully understands?

Our consultants, led by Apache contributors, audit every broker’s login.config, LDAP configuration and directory permissions, and hand you a documented fix plan.

How to check your LDAP configuration

Find anonymous LDAP configs. 

    On each broker, search the JAAS file for the mode: grep -n -E “LDAPLoginModule|authentication” conf/login.config. Any LDAPLoginModule entry with authentication=none needs attention, whatever the broker version. Apache Artemis™ keeps its JAAS file at etc/login.config.

    Check the version. 

      Apache ActiveMQ® before 5.15.14 or 5.16.1, or Apache Artemis™ before 2.16.0, is vulnerable with that setting.

      Test with a wrong password. 

        In a test window, connect as a real, low-privilege user with a deliberately wrong password. The connection must be refused. Then try an empty password; it must be refused too.

        Check the directory. 

          On OpenLDAP, ldapwhoami -x -H ldap://ldap.example.com with no DN performs an anonymous bind. If it returns anonymous instead of an error, anonymous bind is on. Ask your directory team whether unauthenticated binds (bind_anon_dn in OpenLDAP) are enabled.

          Fix the LDAP configuration properly

          Upgrade to a supported release: 

            5.19.11 or 6.3.2 or later. The latest are 5.19.12, 6.3.3 and 6.4.0 (27 October 2026), which also add the empty-password check. On Apache Artemis™, 2.16.0 or later fixes this CVE; run a current release.

            Bind with a service account. 

              Set authentication=simple with a dedicated, read-only directory account in connectionUsername and connectionPassword. Give it rights to search users and groups, nothing else, and keep the file readable only by the broker’s OS user.

              Encrypt the connection. 

                Use ldaps:// in connectionURL, so user passwords aren’t sent in clear text during step 3.

                Close the directory side. 

                  Disable anonymous binds (disallow bind_anon in OpenLDAP) and keep unauthenticated binds off.

                  Our Apache ActiveMQ® Security Hardening Guide covers the surrounding controls: JAAS and LDAP authentication, authorization, TLS on every transport, and network isolation, with a 17-item checklist. 

                  Moving to a service-account LDAP bind?

                  Changing how brokers authenticate touches every client and the directory team. We design the bind account, test it against your directory, and roll it out broker by broker.

                  Get a second pair of eyes on inherited configs

                  CVE-2021-26117 is a reminder that the riskiest settings in a long-lived broker are often the ones nobody has read in years. meshIQ’s Apache ActiveMQ® consultants, led by Apache contributors, review your login, LDAP configuration and directory settings across every broker, fix what’s unsafe, and document it so the next team knows why.

                  Book an Apache ActiveMQ® Security Review →

                  See also: Apache ActiveMQ® CVE Guide: Complete Vulnerability Reference, part of our Apache ActiveMQ® CVE series.

                  Frequently asked questions

                  Q1. What is CVE-2021-26117?

                  CVE-2021-26117 is an LDAP authentication bypass in the Apache ActiveMQ® and Apache Artemis™ LDAP login module. When the module is configured for anonymous LDAP access, it checks the user’s password over the anonymous connection, which always succeeds, so any password works for a valid username. NIST scores it 7.5 High.

                  Q2. Which Apache ActiveMQ® versions fix CVE-2021-26117?

                  Apache ActiveMQ® 5.15.14 and 5.16.1 fix it, as do 5.17.0 and later. Apache Artemis™ 2.16.0 fixes it. Both fixed Apache ActiveMQ® lines are end-of-life, so upgrade to 5.19.11 or 6.3.2 or later.

                  Q3. Am I affected by CVE-2021-26117 if I don’t use LDAP?

                  No. The flaw is only in LDAPLoginModule. Brokers using the properties-file login module, or certificate-based login, are not affected by this CVE.

                  Q4. Is it enough to disable anonymous bind on the LDAP server?

                  It removes the condition the bypass needs, but it isn’t Apache’s stated fix. Apache’s advisory says: “Don’t use anonymous binds in the LDAP configuration or upgrade.” Do both, because a broker’s LDAP configuration can later be pointed at a directory that does allow anonymous access.

                  Cookies preferences

                  ✕

                  Others

                  Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

                  Necessary

                  Necessary
                  Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

                  Advertisement

                  Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

                  Analytics

                  Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

                  Functional

                  Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

                  Performance

                  Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.