# CVE-2020-10737: Race condition in oddjob

> An attacker can exploit a race condition in mkhomedir to change ownership of arbitrary directories via symlinks, leading to privilege escalation.

- **Severity:** Medium 6.3 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 27 May 2020
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2020-10737, GHSA-m6xw-hhwx-7qjc, RHSA-2020:4687, UBUNTU-CVE-2020-10737, USN-5169-1, openSUSE-SU-2024:11109-1

## What is CVE-2020-10737?

CVE-2020-10737 is a medium-severity vulnerability in Red Hat oddjob, published on 27 May 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

A race condition was found in the mkhomedir tool shipped with the oddjob package in versions before 0.34.5 and 0.34.6 wherein, during the home creation, mkhomedir copies the /etc/skel directory into the newly created home and changes its ownership to the home's user without properly checking the homedir path. This flaw allows an attacker to leverage this issue by creating a symlink point to a target folder, which then has its ownership transferred to the new home directory's unprivileged user.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `oddjob` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.34.5-3.el8 |
| `oddjob-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.34.5-3.el8 |
| `oddjob-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.34.5-3.el8 |
| `oddjob-mkhomedir` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.34.5-3.el8 |
| `oddjob-mkhomedir-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.34.5-3.el8 |
| `oddjob` | openSUSE:Tumbleweed | All versions | 0.34.5-1.9 |

Products: Redhat Oddjob.

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

Upgrade to a fixed version.

## Is CVE-2020-10737 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2020-10737 is a medium-severity vulnerability in Red Hat oddjob, published on 27 May 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-10737 in the wild and no public exploit code.

Affected product: Red Hat oddjob. 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-10737/ (Markdown: https://insights.sbomify.com/CVE-2020-10737/index.md)
```

## Sources

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

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