Integer overflow in GNU Cpio

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 write. NOTE: it is unclear whether there are common cases where the pattern file, associated with the -E option, is untrusted data.

Vulnerability class: Integer Overflow

Published · last modified .

CVSS v3 metric

CVSS v3 base score 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS 0.042, 91.0th percentile (scored ); unchanged over 30 days. About EPSS.

Affected products

Weakness classification (CWE)

Public exploits and proof-of-concept code

1 public repository with exploit or proof-of-concept code for this CVE:

  • fangqyi/cpiopwn (5 stars, last pushed 2021-08-11): ACE poc exploit for glibc cpio 2.13 through mmap chunk metadata curruption (CVE-2021-38185)

Also mentioned in 5 other repositories (ARPSyndicate/cvemon, ARPSyndicate/cve-scores, fokypoky/places-list, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.

References