High severity · published Aug 8, 2021
CVE-2021-38185
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…
7.8
CVSS
4.2%
EPSS
No
On KEV
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 vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)4.2% · higher than 91% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CP
Cpio · Gnu
through 2.13 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-38185
CVE.org
https://www.cve.org/CVERecord?id=CVE-2021-38185
Patch
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
Exploit
https://github.com/fangqyi/cpiopwn
lists.debian.org
https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
Exploit
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
Exploit
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
More from Cpio
7.3
CVE-2019-14866
In all versions of cpio before 2.13 does not properly validate input files when generating TAR archives
7.2
CVE-2010-4226
cpio, 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 an RPM package archive
6.5
CVE-2016-2037
The 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 cpio file
5.3
CVE-2023-7216
A path traversal vulnerability was found in the CPIO utility
4.9
CVE-2023-7207
Debian's cpio contains a path traversal vulnerability
