CVE-2020-16093
📋 TL;DR
LemonLDAP::NG versions through 2.0.8 do not validate X.509 certificates when connecting to LDAP backends by default, allowing man-in-the-middle attacks. This affects all deployments using LDAPS connections with default configuration. Attackers could intercept or manipulate authentication traffic.
💻 Affected Systems
- LemonLDAP::NG (lemonldap-ng)
📦 What is this software?
Lemonldap\ by Lemonldap Ng
⚠️ Risk & Real-World Impact
Worst Case
Full credential interception leading to account compromise, privilege escalation, and unauthorized access to protected resources.
Likely Case
Authentication bypass or credential theft through LDAP interception, potentially granting unauthorized access to applications behind LemonLDAP::NG.
If Mitigated
Limited to denial of service if certificate validation fails, with proper network segmentation preventing interception.
🎯 Exploit Status
Exploitation requires network position to intercept LDAPS traffic. No authentication needed to perform MITM attack.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after 2.0.8
Vendor Advisory: https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2250
Restart Required: Yes
Instructions:
1. Upgrade to LemonLDAP::NG version after 2.0.8. 2. Update configuration to explicitly enable certificate validation. 3. Restart LemonLDAP::NG services.
🔧 Temporary Workarounds
Enable certificate validation in configuration
allModify LemonLDAP::NG configuration to force certificate validation for LDAPS connections
Edit lemonldap-ng.ini and set 'verify' => 'require' for LDAP backend connections
Use LDAP instead of LDAPS with internal encryption
allSwitch to plain LDAP with TLS encryption handled at network layer (VPN, IPSec)
Change backend configuration from ldaps:// to ldap:// and implement network-level encryption
🧯 If You Can't Patch
- Implement network segmentation to isolate LDAPS traffic from potential attackers
- Deploy certificate pinning or use internal CA with strict validation
🔍 How to Verify
Check if Vulnerable:
Check LemonLDAP::NG version and verify if LDAPS backend connections have certificate validation disabled in configuration
Check Version:
perl -MLemonldap::NG::Portal -e 'print $Lemonldap::NG::Portal::VERSION'
Verify Fix Applied:
Confirm version is >2.0.8 and check that LDAPS connections have 'verify' parameter set to 'require' or higher
📡 Detection & Monitoring
Log Indicators:
- LDAPS connection failures without certificate validation errors
- Unexpected authentication successes from unusual locations
Network Indicators:
- Unencrypted LDAP traffic despite LDAPS configuration
- MITM tools intercepting LDAPS ports
SIEM Query:
source="lemonldap-ng" AND (event="authentication" AND result="success") AND src_ip NOT IN trusted_networks
🔗 References
- https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2250
- https://lemonldap-ng.org/download
- https://lists.debian.org/debian-lts-announce/2023/01/msg00027.html
- https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2250
- https://lemonldap-ng.org/download
- https://lists.debian.org/debian-lts-announce/2023/01/msg00027.html