# CVE-2018-10897: Path traversal in yum-utils:

> Attackers controlling a repository can overwrite critical system files via path traversal in reposync, potentially leading to system compromise.

- **Severity:** High 8.8 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Aug 2018
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-48q2-62w2-89cw, RHSA-2018:2284, RHSA-2018:2285, RHSA-2018:2626

## What is CVE-2018-10897?

CVE-2018-10897 is a high-severity path traversal vulnerability in Redhat Enterprise Linux Desktop, published on 1 Aug 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A directory traversal issue was found in reposync, a part of yum-utils, where reposync fails to sanitize paths in remote repository configuration files. If an attacker controls a repository, they may be able to copy files outside of the destination directory on the targeted system via path traversal. If reposync is running with heightened privileges on a targeted system, this flaw could potentially result in system compromise via the overwriting of critical system files. Version 1.1.31 and older are believed to be affected.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2018-10897?

It affects 5 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `yum-NetworkManager-dispatcher` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-aliases` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-auto-update-debug-info` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-changelog` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-fastestmirror` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-filter-data` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-fs-snapshot` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-keys` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-list-data` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-local` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-merge-conf` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-ovl` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-post-transaction-actions` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-priorities` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-protectbase` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-ps` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-remove-with-leaves` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-rpm-warm-cache` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-security` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-show-leaves` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-tmprepo` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-tsflags` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-upgrade-helper` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-verify` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-versionlock` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-updateonboot` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-utils` | Red Hat:enterprise_linux:6::client | All versions | 0:1.1.30-42.el6_10 |
| `yum-NetworkManager-dispatcher` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-aliases` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-auto-update-debug-info` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-changelog` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-fastestmirror` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-filter-data` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-fs-snapshot` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-keys` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-list-data` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-local` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-merge-conf` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-ovl` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |
| `yum-plugin-post-transaction-actions` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.1.30-42.el6_10 |

Products: Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Workstation, Redhat Virtualization, Rpm Yum-Utils.

## How do I fix CVE-2018-10897?

Apply the vendor's patch.

## Is CVE-2018-10897 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux Desktop

- [CVE-2016-5405](https://insights.sbomify.com/CVE-2016-5405/): Information disclosure in n/a (critical 9.8)
- [CVE-2016-7050](https://insights.sbomify.com/CVE-2016-7050/): Deserialization in n/a (critical 9.8)
- [CVE-2014-8241](https://insights.sbomify.com/CVE-2014-8241/): Null dereference in n/a (critical 9.8)
- [CVE-2014-8567](https://insights.sbomify.com/CVE-2014-8567/): Denial of service in n/a (critical 9.4)
- [CVE-2014-8139](https://insights.sbomify.com/CVE-2014-8139/): Memory corruption in UnZip (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-10897 and fix it if it is affected.

What it is: CVE-2018-10897 is a high-severity path traversal vulnerability in Redhat Enterprise Linux Desktop, published on 1 Aug 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2018-10897 in the wild and no public exploit code.

Affected product: Redhat Enterprise Linux Desktop. 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-2018-10897/ (Markdown: https://insights.sbomify.com/CVE-2018-10897/index.md)
```

## Sources

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

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