# CVE-2019-14866: Path traversal in cpio

> An attacker can craft malicious input to cpio to create TAR archives with unauthorized permissions or paths, leading to system compromise when extracted by a privileged user.

- **Severity:** Medium 6.7 (`CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/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:** 7 Jan 2020
- **Updated:** 13 Feb 2025
- **Also known as:** CLEANSTART-2024-VM66641, DEBIAN-CVE-2019-14866, DLA-1981-1, GHSA-g3pr-277r-xcx7, RHSA-2020:3908, RHSA-2021:1582, RHSA-2022:0073, RLSA-2021:1582, SUSE-SU-2019:3059-1, SUSE-SU-2019:3064-1, UBUNTU-CVE-2019-14866, USN-4176-1, openSUSE-SU-2019:2593-1, openSUSE-SU-2019:2596-1

## What is CVE-2019-14866?

CVE-2019-14866 is a medium-severity path traversal vulnerability in Redhat Enterprise Linux, published on 7 Jan 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

In all versions of cpio before 2.13 does not properly validate input files when generating TAR archives. When cpio is used to create TAR archives from paths an attacker can write to, the resulting archive may contain files with permissions the attacker did not have or in paths he did not have access to. Extracting those archives from a high-privilege user without carefully reviewing them may lead to the compromise of the system.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2019-14866?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cpio` | Red Hat:enterprise_linux:7::client | All versions | 0:2.11-28.el7 |
| `cpio-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:2.11-28.el7 |
| `cpio` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.11-28.el7 |
| `cpio-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.11-28.el7 |
| `cpio` | Red Hat:enterprise_linux:7::server | All versions | 0:2.11-28.el7 |
| `cpio-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:2.11-28.el7 |
| `cpio` | Red Hat:enterprise_linux:7::workstation | All versions | 0:2.11-28.el7 |
| `cpio-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:2.11-28.el7 |
| `cpio` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.12-10.el8 |
| `cpio-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.12-10.el8 |
| `cpio-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.12-10.el8 |
| `cpio` | Red Hat:rhel_eus:8.2::baseos | All versions | 0:2.12-8.el8_2.1 |
| `cpio-debuginfo` | Red Hat:rhel_eus:8.2::baseos | All versions | 0:2.12-8.el8_2.1 |
| `cpio-debugsource` | Red Hat:rhel_eus:8.2::baseos | All versions | 0:2.12-8.el8_2.1 |
| `cpio` | Rocky Linux:8 | All versions | 0:2.12-10.el8 |
| `cpio` | SUSE:Linux Enterprise Desktop 12 SP4 | All versions | 2.11-36.6.1 |
| `cpio` | SUSE:Linux Enterprise Module for Basesystem 15 | All versions | 2.12-3.3.1 |
| `cpio` | SUSE:Linux Enterprise Module for Basesystem 15 SP1 | All versions | 2.12-3.3.1 |
| `cpio` | SUSE:Linux Enterprise Server 12 SP4 | All versions | 2.11-36.6.1 |
| `cpio` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.11-36.6.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 2.11-36.6.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.11-36.6.1 |
| `cpio` | openSUSE:Leap 15.0 | All versions | 2.12-lp150.2.3.1 |
| `cpio` | openSUSE:Leap 15.1 | All versions | 2.12-lp151.3.3.1 |

Products: Gnu Cpio, Redhat Enterprise Linux.

## How do I fix CVE-2019-14866?

Upgrade to a fixed version.

## Is CVE-2019-14866 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2021-38185](https://insights.sbomify.com/CVE-2021-38185/): Integer overflow in n/a (high 7.8)
- [CVE-2010-4226](https://insights.sbomify.com/CVE-2010-4226/): Path traversal in n/a (high 7.2)
- [CVE-2010-0624](https://insights.sbomify.com/CVE-2010-0624/): Memory corruption in n/a (medium 6.8)
- [CVE-2023-7216](https://insights.sbomify.com/CVE-2023-7216/): Cpio: extraction allows symlinks which enables remote command execution (medium 5.3)
- [CVE-2023-7207](https://insights.sbomify.com/CVE-2023-7207/): Path traversal in Debian cpio (medium 4.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-14866 and fix it if it is affected.

What it is: CVE-2019-14866 is a medium-severity path traversal vulnerability in Redhat Enterprise Linux, published on 7 Jan 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-2019-14866 in the wild and no public exploit code.

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

## Sources

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

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