CVE-2026-59367
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring LDAP is a Java library that simplifies the development of applications that use LDAP by using Spring's familiar template-based approach. Its spring-ldap-test artifact provides an embedded LDAP server that test suites start as a local directory fixture.
An incorrectly configured access control vulnerability (CVE-2026-59367) has been identified in the embedded LDAP server (EmbeddedLdapServer) provided by Spring LDAP's spring-ldap-test artifact, which allows attackers who can reach the server's port over the network to authenticate as the directory administrator with a publicly known credential. Such an attacker can read, add, modify, and delete entries in the embedded directory and disrupt tests that depend on its contents.
Per OWASP: An application might be vulnerable if "Unnecessary features are enabled or installed (e.g., unnecessary ports, services, pages, accounts, or privileges)" or if "Default accounts and their passwords are still enabled and unchanged."
This issue affects multiple versions of Spring LDAP.
Details
Module Info
- Product: Spring LDAP
- Affected packages:
org.springframework.ldap:spring-ldap-test - Affected versions: <=2.4.6, >=3.2.0 <=3.2.19, >=3.3.0 <=3.3.9, >=4.0.0 <=4.0.6, >=4.1.0 <=4.1.2
- GitHub repository: https://github.com/spring-projects/spring-ldap
- Published packages: https://central.sonatype.com/artifact/org.springframework.ldap/spring-ldap-test
- Package manager: Maven
- Fixed in:
- OSS Spring LDAP 4.0.7, 4.1.3
Vulnerability Info
This Critical-severity vulnerability is found in the org.springframework.ldap:spring-ldap-test package in multiple versions of Spring LDAP. Its CVSS 3.1 base score is 9.4 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L).
org.springframework.ldap.test.unboundid.EmbeddedLdapServer is meant to be a test fixture for the machine that runs it. Whether it is started through EmbeddedLdapServer.newEmbeddedServer(...) or its Builder, the server is configured by the following method:
private static InMemoryDirectoryServerConfig inMemoryDirectoryServerConfig(String partitionSuffix, int port)
throws LDAPException {
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(partitionSuffix);
config.addAdditionalBindCredentials("uid=admin,ou=system", "secret");
config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("LDAP", port));
config.setEnforceSingleStructuralObjectClass(false);
config.setEnforceAttributeSyntaxCompliance(true);
return config;
}
InMemoryListenerConfig.createLDAPConfig("LDAP", port) sets no listen address, so the UnboundID listener accepts connections on every network interface of the host rather than only on the loopback interface. The same configuration registers the administrative bind DN uid=admin,ou=system with the fixed password secret, which is built into the library rather than supplied by the application. The two weaknesses are CWE-1327 (binding to an unrestricted IP address) and CWE-798 (use of hard-coded credentials).
Anyone who can reach the listening port, for example on a shared CI agent, a shared development network, or a container with a published port, can bind as uid=admin,ou=system and gains full read and write access to the embedded directory. No user interaction or prior privileges are needed.
Mitigation
Only recent versions of Spring LDAP receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring LDAP.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.