# CVE-2020-8023: Local privilege escalation from ldap to root when using OPENLDAP_CONFIG_BACKEND=ldap in openldap2

> Local attackers can escalate privileges from user ldap to root in SUSE Linux when using the ldap configuration backend.

- **Severity:** High 7.7 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Sep 2020
- **Updated:** 16 Sep 2024
- **Also known as:** GHSA-jpq8-q698-27vp, SUSE-SU-2020:14419-1, SUSE-SU-2020:1855-1, SUSE-SU-2020:1856-1, SUSE-SU-2020:1859-1, openSUSE-SU-2020:0956-1, openSUSE-SU-2020:0976-1

## What is CVE-2020-8023?

CVE-2020-8023 is a high-severity vulnerability in SUSE Enterprise Storage 5, published on 1 Sep 2020. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A acceptance of Extraneous Untrusted Data With Trusted Data vulnerability in the start script of openldap2 of SUSE Enterprise Storage 5, SUSE Linux Enterprise Debuginfo 11-SP3, SUSE Linux Enterprise Debuginfo 11-SP4, SUSE Linux Enterprise Point of Sale 11-SP3, SUSE Linux Enterprise Server 11-SECURITY, SUSE Linux Enterprise Server 11-SP4-LTSS, SUSE Linux Enterprise Server 12-SP2-BCL, SUSE Linux Enterprise Server 12-SP2-LTSS, SUSE Linux Enterprise Server 12-SP3-BCL, SUSE Linux Enterprise Server 12-SP3-LTSS, SUSE Linux Enterprise Server 12-SP4, SUSE Linux Enterprise Server 12-SP5, SUSE Linux Enterprise Server 15-LTSS, SUSE Linux Enterprise Server for SAP 12-SP2, SUSE Linux Enterprise Server for SAP 12-SP3, SUSE Linux Enterprise Server for SAP 15, SUSE OpenStack Cloud 7, SUSE OpenStack Cloud 8, SUSE OpenStack Cloud Crowbar 8; openSUSE Leap 15.1, openSUSE Leap 15.2 allows local attackers to escalate privileges from user ldap to root. This issue affects: SUSE Enterprise Storage 5 openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Debuginfo 11-SP3 openldap2 versions prior to 2.4.26-0.74.13.1,. SUSE Linux Enterprise Debuginfo 11-SP4 openldap2 versions prior to 2.4.26-0.74.13.1,. SUSE Linux Enterprise Point of Sale 11-SP3 openldap2 versions prior to 2.4.26-0.74.13.1,. SUSE Linux Enterprise Server 11-SECURITY openldap2-client-openssl1 versions prior to 2.4.26-0.74.13.1. SUSE Linux Enterprise Server 11-SP4-LTSS openldap2 versions prior to 2.4.26-0.74.13.1,. SUSE Linux Enterprise Server 12-SP2-BCL openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server 12-SP2-LTSS openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server 12-SP3-BCL openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server 12-SP3-LTSS openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server 12-SP4 openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server 12-SP5 openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server 15-LTSS openldap2 versions prior to 2.4.46-9.31.1. SUSE Linux Enterprise Server for SAP 12-SP2 openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server for SAP 12-SP3 openldap2 versions prior to 2.4.41-18.71.2. SUSE Linux Enterprise Server for SAP 15 openldap2 versions prior to 2.4.46-9.31.1. SUSE OpenStack Cloud 7 openldap2 versions prior to 2.4.41-18.71.2. SUSE OpenStack Cloud 8 openldap2 versions prior to 2.4.41-18.71.2. SUSE OpenStack Cloud Crowbar 8 openldap2 versions prior to 2.4.41-18.71.2. openSUSE Leap 15.1 openldap2 versions prior to 2.4.46-lp151.10.12.1. openSUSE Leap 15.2 openldap2 versions prior to 2.4.46-lp152.14.3.1.

Weakness: CWE-349 (Acceptance of Extraneous Untrusted Data With Trusted Data)

## Which versions are affected by CVE-2020-8023?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openldap2` | SUSE:Enterprise Storage 5 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:HPE Helion OpenStack 8 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Basesystem 15 SP1 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Development Tools 15 SP1 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Legacy 12 | All versions | 2.4.41-18.24.20.2 |
| `openldap2` | SUSE:Linux Enterprise Module for Legacy 15 SP1 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Legacy 15 SP2 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Point of Sale 11 SP3 | All versions | 2.4.26-0.74.13.1 |
| `openldap2-client` | SUSE:Linux Enterprise Point of Sale 11 SP3 | All versions | 2.4.26-0.74.13.1 |
| `openldap2` | SUSE:Linux Enterprise Server 11 SP4-LTSS | All versions | 2.4.26-0.74.13.1 |
| `openldap2-client` | SUSE:Linux Enterprise Server 11 SP4-LTSS | All versions | 2.4.26-0.74.13.1 |
| `openldap2-client-openssl1` | SUSE:Linux Enterprise Server 11-SECURITY | All versions | 2.4.26-0.74.13.1 |
| `openldap2` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server 12 SP4 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server 15-LTSS | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 2.4.41-18.24.20.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 2.4.41-18.24.20.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 2.4.41-18.24.20.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.4.41-18.24.20.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 15 | All versions | 2.4.46-9.31.1 |
| `openldap2` | SUSE:Linux Enterprise Software Development Kit 12 SP4 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:OpenStack Cloud 7 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:OpenStack Cloud 8 | All versions | 2.4.41-18.71.2 |
| `openldap2` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 2.4.41-18.71.2 |
| `openldap2` | openSUSE:Leap 15.1 | All versions | 2.4.46-lp151.10.12.1 |
| `openldap2` | openSUSE:Leap 15.2 | All versions | 2.4.46-lp152.14.3.1 |

Products: Opensuse Openldap2.

## How do I fix CVE-2020-8023?

Apply the vendor's patch.

## Is CVE-2020-8023 being exploited?

There is no known exploitation of CVE-2020-8023 in the wild and no public exploit code.

## Other vulnerabilities in SUSE Enterprise Storage 5

- [CVE-2020-8027](https://insights.sbomify.com/CVE-2020-8027/): openldap uses fixed paths in /tmp (high 7.3)
- [CVE-2022-31253](https://insights.sbomify.com/CVE-2022-31253/): openldap2: /usr/lib/openldap/start allows ldap user/group to recursively chown arbitrary directory trees to itself (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-8023 and fix it if it is affected.

What it is: CVE-2020-8023 is a high-severity vulnerability in SUSE Enterprise Storage 5, published on 1 Sep 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-8023 in the wild and no public exploit code.

Affected product: SUSE Enterprise Storage 5. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-8023/ (Markdown: https://insights.sbomify.com/CVE-2020-8023/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-8023
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-8023
- OSV: https://osv.dev/vulnerability/CVE-2020-8023

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-8023/
Summaries are generated and may contain mistakes; the official description above is the record.
