Vulnerability record · CVE-2022-29155 · published 4 May 2022
CVE-2022-29155: OpenLDAP back-sql backend SQL injection via LDAP search filter
Openldap · Openldap
OpenLDAP 2.x before 2.5.12 and 2.6.x before 2.6.2 contain a SQL injection flaw in the experimental back-sql backend to slapd. A SQL statement embedded in an LDAP query is not properly escaped when the search filter is processed during an LDAP search operation. The affected backend is experimental, so exposure depends on whether it is deployed.
Description
In OpenLDAP 2.x before 2.5.12 and 2.6.x before 2.6.2, a SQL injection vulnerability exists in the experimental back-sql backend to slapd, via a SQL statement within an LDAP query. This can occur during an LDAP search operation when the search filter is processed, due to a lack of proper escaping.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
high priorityCritical CVSS 9.8 with high EPSS and public exploit detail, tempered by the flaw being limited to the experimental back-sql backend.
What it is
OpenLDAP 2.x before 2.5.12 and 2.6.x before 2.6.2 contain a SQL injection flaw in the experimental back-sql backend to slapd. A SQL statement embedded in an LDAP query is not properly escaped when the search filter is processed during an LDAP search operation. The affected backend is experimental, so exposure depends on whether it is deployed.
Impact
An unauthenticated remote attacker can inject SQL through an LDAP search filter, potentially reading or modifying the underlying SQL database and, per the CVSS vector, compromising confidentiality, integrity and availability.
Attack surface
Reached over the network through an LDAP search operation against a slapd instance configured with the back-sql backend; the CVSS vector indicates no authentication and no user interaction are required.
Exploitation
Not listed in CISA KEV and no ransomware usage is documented, but EPSS is high (0.64487, 99.2nd percentile) and the vendor bug report is tagged Exploit, indicating public exploit detail exists.
What to do
- Upgrade OpenLDAP to 2.5.12 or 2.6.2 or later; apply the Debian DSA-5140 update where applicable.
- If back-sql is not required, disable or do not load the experimental back-sql backend.
- Restrict network access to slapd LDAP ports to trusted clients only.
- Apply the NetApp advisory guidance for affected H-series firmware products.
- Review database accounts used by back-sql for least privilege.
Detection
- Inspect slapd logs for LDAP search filters containing SQL syntax such as quotes, UNION, or comment sequences.
- Monitor the backend SQL database for anomalous queries or errors originating from the slapd host.
- Audit slapd configuration to identify hosts running the back-sql backend.
- Alert on unexpected changes to data reachable through the back-sql mapping.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
8 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://bugs.openldap.org/show_bug.cgi?id=9815 | ExploitIssue TrackingVendor Advisory |
| https://lists.debian.org/debian-lts-announce/2022/05/msg00032.html | Mailing ListThird Party Advisory |
| https://security.netapp.com/advisory/ntap-20220609-0007/ | Third Party Advisory |
| https://www.debian.org/security/2022/dsa-5140 | Third Party Advisory |
| https://bugs.openldap.org/show_bug.cgi?id=9815 | ExploitIssue TrackingVendor Advisory |
| https://lists.debian.org/debian-lts-announce/2022/05/msg00032.html | Mailing ListThird Party Advisory |
| https://security.netapp.com/advisory/ntap-20220609-0007/ | Third Party Advisory |
| https://www.debian.org/security/2022/dsa-5140 | Third Party Advisory |
Track CVE-2022-29155 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2022-29155), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.