CVE-2020-12243

7.5 HIGH

📋 TL;DR

This vulnerability in OpenLDAP's slapd daemon allows attackers to crash the LDAP service by sending specially crafted search filters with nested boolean expressions. This affects all OpenLDAP servers running versions before 2.4.50. The denial of service can disrupt authentication and directory services.

💻 Affected Systems

Products:
  • OpenLDAP slapd
Versions: All versions before 2.4.50
Operating Systems: All operating systems running OpenLDAP
Default Config Vulnerable: ⚠️ Yes
Notes: All OpenLDAP installations with search functionality enabled are vulnerable. The vulnerability is in the filter parsing code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete LDAP service outage affecting authentication, authorization, and directory lookups for all dependent applications and users.

🟠

Likely Case

Service disruption requiring manual restart of slapd, causing temporary authentication failures for users and applications.

🟢

If Mitigated

Minimal impact with proper monitoring and automated restart mechanisms in place.

🌐 Internet-Facing: HIGH - Attackers can exploit this remotely without authentication to crash the service.
🏢 Internal Only: MEDIUM - Internal attackers or compromised systems could disrupt critical directory services.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is simple to exploit by sending malformed LDAP search filters. No authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.4.50 and later

Vendor Advisory: https://bugs.openldap.org/show_bug.cgi?id=9202

Restart Required: Yes

Instructions:

1. Download OpenLDAP 2.4.50 or later from openldap.org. 2. Stop slapd service. 3. Install the new version. 4. Restart slapd service.

🔧 Temporary Workarounds

Filter validation via proxy

all

Deploy an LDAP proxy that validates and filters incoming search requests before forwarding to OpenLDAP.

Rate limiting

linux

Implement network-level rate limiting to prevent rapid exploitation attempts.

iptables -A INPUT -p tcp --dport 389 -m limit --limit 10/min -j ACCEPT
iptables -A INPUT -p tcp --dport 389 -j DROP

🧯 If You Can't Patch

  • Implement strict network segmentation to limit access to LDAP servers
  • Deploy monitoring with automatic restart scripts for slapd crashes

🔍 How to Verify

Check if Vulnerable:

Check OpenLDAP version: slapd -VV 2>&1 | grep 'OpenLDAP'

Check Version:

slapd -VV 2>&1 | grep 'OpenLDAP'

Verify Fix Applied:

Verify version is 2.4.50 or higher and test with known malicious search filters.

📡 Detection & Monitoring

Log Indicators:

  • slapd crash logs
  • segmentation fault errors in system logs
  • unexpected slapd process termination

Network Indicators:

  • Multiple LDAP search requests with complex nested filters
  • Unusual spike in LDAP traffic followed by service unavailability

SIEM Query:

source="slapd.log" AND ("segmentation fault" OR "crash" OR "terminated")

🔗 References

📤 Share & Export