CVE-2019-14866
cpio: improper input validation when writing tar header fields leads to unexpected tar generation
Severity
ModerateRed Hat Product Security
CVSS 3.0
Review impact separately from score.
Published · August 30, 2019
Updated · November 21, 2025
Description
It was discovered cpio 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.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
TAR archives should be inspected before being extracted and the extraction should be performed with the tar command or --no-absolute-filenames option if done with cpio. Moreover, it should be performed by a low-privilege user whenever possible, to prevent extraction of files that could compromise the system.
CVSS / CWE
CVSS 3.0 · 6.7CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
CWE-20 · Improper Input Validation