← Vulnerability feed

Vulnerability record · CVE-2021-38185 · published 8 August 2021

CVE-2021-38185: Gnu cpio integer overflow vulnerability

Gnu · Cpio

GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c ds_fgetstr integer overflow that triggers an out-of-bounds heap write. NOTE: it is unclear whether there are common cases where the pattern file, associated with the -E option, is untrusted data.

7.8 CVSS 3.1 High EPSS 4.2% · top 9.5% CWE-190 · Integer overflow
7.8CVSS 3.1 base score, v2 6.8
4.2%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
10References, 6 tagged exploit
17 Jun 2026Last modified by NVD

Description

GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c ds_fgetstr integer overflow that triggers an out-of-bounds heap write. NOTE: it is unclear whether there are common cases where the pattern file, associated with the -E option, is untrusted data.

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-38185 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

7.3CVE-2019-14866Gnu cpio improper input validation vulnerabilityIn 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 fro…EPSS 0.69%7.2CVE-2010-4226Gnu cpio link following vulnerabilitycpio, as used in build 2007.05.10, 2010.07.28, and possibly other versions, allows remote attackers to overwrite arbitrary files via a symlink within…EPSS 2.9%6.8CVE-2010-0624Gnu cpio memory buffer overflow vulnerabilityHeap-based buffer overflow in the rmt_read__ function in lib/rtapelib.c in the rmt client functionality in GNU tar before 1.23 and GNU cpio before 2.…EPSS 4.7%6.5CVE-2016-2037Gnu cpio memory buffer overflow vulnerabilityThe cpio_safer_name_suffix function in util.c in cpio 2.11 allows remote attackers to cause a denial of service (out-of-bounds write) via a crafted c…EPSS 5.5%5.3CVE-2023-7216Gnu cpio link following vulnerabilityA path traversal vulnerability was found in the CPIO utility. This issue could allow a remote unauthenticated attacker to trick a user into opening a…EPSS 0.90%5.0CVE-2014-9112Gnu cpio memory buffer overflow vulnerabilityHeap-based buffer overflow in the process_copy_in function in GNU Cpio 2.11 allows remote attackers to cause a denial of service via a large block va…EPSS 7.1%4.9CVE-2023-7207Gnu cpio path traversal vulnerabilityDebian's cpio contains a path traversal vulnerability. This issue was introduced by reverting CVE-2015-1197 patches which had caused a regression in …EPSS 0.91%4.7CVE-2005-1111Gnu cpio link following vulnerabilityRace condition in cpio 2.6 and earlier allows local users to modify permissions of arbitrary files via a hard link attack on a file while it is being…EPSS 0.31%

Source: NIST National Vulnerability Database (record CVE-2021-38185), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.