# CVE-2020-8027: openldap uses fixed paths in /tmp

> Local attackers can overwrite arbitrary files via insecure temporary file handling in openldap, potentially gaining configuration access and escalating privileges.

- **Severity:** High 7.3 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H`)
- **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:** 11 Feb 2021
- **Updated:** 16 Sep 2024
- **Also known as:** GHSA-9rfj-vjc2-f7cj, SUSE-SU-2020:2712-1, SUSE-SU-2020:2712-2, openSUSE-SU-2020:1534-1, openSUSE-SU-2020:1539-1

## What is CVE-2020-8027?

CVE-2020-8027 is a high-severity path traversal vulnerability in SUSE Linux Enterprise Server 15-LTSS, published on 11 Feb 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A Insecure Temporary File vulnerability in openldap2 of SUSE Linux Enterprise Server 15-LTSS, SUSE Linux Enterprise Server for SAP 15; openSUSE Leap 15.1, openSUSE Leap 15.2 allows local attackers to overwrite arbitrary files and gain access to the openldap2 configuration This issue affects: SUSE Linux Enterprise Server 15-LTSS openldap2 versions prior to 2.4.46-9.37.1. SUSE Linux Enterprise Server for SAP 15 openldap2 versions prior to 2.4.46-9.37.1. openSUSE Leap 15.1 openldap2 versions prior to 2.4.46-lp151.10.18.1. openSUSE Leap 15.2 openldap2 versions prior to 2.4.46-lp152.14.9.1.

Weakness: CWE-377 (DEPRECATED: Insecure Temporary File)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openldap2` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Basesystem 15 SP1 | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Development Tools 15 SP1 | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Legacy 15 SP1 | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Module for Legacy 15 SP2 | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Server 15-LTSS | All versions | 2.4.46-9.37.1 |
| `openldap2` | SUSE:Linux Enterprise Server for SAP Applications 15 | All versions | 2.4.46-9.37.1 |
| `openldap2` | openSUSE:Leap 15.1 | All versions | 2.4.46-lp151.10.18.1 |
| `openldap2` | openSUSE:Leap 15.2 | All versions | 2.4.46-lp152.14.9.1 |

Products: Opensuse Openldap2.

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

Apply the vendor's patch.

## Is CVE-2020-8027 being exploited?

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

## Other vulnerabilities in SUSE Linux Enterprise Server 15-LTSS

- [CVE-2020-8023](https://insights.sbomify.com/CVE-2020-8023/): Local privilege escalation from ldap to root when using OPENLDAP_CONFIG_BACKEND=ldap in openldap2 (high 7.7)
- [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-8027 and fix it if it is affected.

What it is: CVE-2020-8027 is a high-severity path traversal vulnerability in SUSE Linux Enterprise Server 15-LTSS, published on 11 Feb 2021. 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-8027 in the wild and no public exploit code.

Affected product: SUSE Linux Enterprise Server 15-LTSS. 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-8027/ (Markdown: https://insights.sbomify.com/CVE-2020-8027/index.md)
```

## Sources

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

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