# CVE-2018-15664: Path traversal in n/a

> Attackers can exploit symlink exchange in docker cp to achieve arbitrary read-write access to the host filesystem with root privileges.

- **Severity:** High 7.5 (`CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 23 May 2019
- **Updated:** 5 Aug 2024
- **Also known as:** CLEANSTART-2026-FG82255, DEBIAN-CVE-2018-15664, GHSA-pv79-5r2c-jrpq, RHSA-2019:1910, SUSE-SU-2019:1514-1, SUSE-SU-2019:1562-1, UBUNTU-CVE-2018-15664, openSUSE-SU-2019:1621-1

## What is CVE-2018-15664?

CVE-2018-15664 is a high-severity path traversal vulnerability in n/a, published on 23 May 2019. 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

In Docker through 18.06.1-ce-rc2, the API endpoints behind the 'docker cp' command are vulnerable to a symlink-exchange attack with Directory Traversal, giving attackers arbitrary read-write access to the host filesystem with root privileges, because daemon/archive.go does not do archive operations on a frozen filesystem (or from within a chroot).

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

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `docker` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-client` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-common` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-debuginfo` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-logrotate` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-lvm-plugin` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-novolume-plugin` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-rhel-push-plugin` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker-v1.10-migrator` | Red Hat:rhel_extras_other:7 | All versions | 2:1.13.1-102.git7f2769b.el7 |
| `docker` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 18.09.6_ce-98.40.1 |
| `docker` | SUSE:Linux Enterprise Module for Containers 15 | All versions | 18.09.6_ce-6.20.3 |
| `docker` | SUSE:Linux Enterprise Module for Containers 15 SP1 | All versions | 18.09.6_ce-6.20.3 |
| `docker` | openSUSE:Leap 15.0 | All versions | 18.09.6_ce-lp151.2.6.1 |
| `docker` | openSUSE:Leap 15.1 | All versions | 18.09.6_ce-lp151.2.6.1 |

Products: Docker Docker.

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

Apply the vendor's patch.

## Is CVE-2018-15664 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2014-9357](https://insights.sbomify.com/CVE-2014-9357/): Arbitrary Code Execution (critical 10.0)
- [CVE-2020-14298](https://insights.sbomify.com/CVE-2020-14298/): Privilege escalation in Docker (high 8.8)
- [CVE-2020-14300](https://insights.sbomify.com/CVE-2020-14300/): Privilege escalation in Docker (high 8.8)
- [CVE-2018-15514](https://insights.sbomify.com/CVE-2018-15514/): Deserialization in n/a (high 8.8)
- [CVE-2014-9356](https://insights.sbomify.com/CVE-2014-9356/): Path Traversal in Docker (high 8.6)

## Fix prompt for AI coding agents

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

What it is: CVE-2018-15664 is a high-severity path traversal vulnerability in n/a, published on 23 May 2019. 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-2018-15664 in the wild and no public exploit code.

Affected product: n/a. 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-15664/ (Markdown: https://insights.sbomify.com/CVE-2018-15664/index.md)
```

## Sources

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

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