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 (90.5th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 91st percentile — 90.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.041 · newest: 0.042 · change: +0.000
Affected products
Weakness classification (CWE)
Public proof-of-concept exploits
References
- github.com/fangqyi/cpiopwn (Exploit, Third Party Advisory)
- lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html (Exploit, Mailing List, Vendor Advisory)
- lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html (Exploit, Mailing List, Vendor Advisory)
- git.savannah.gnu.org/cgit/cpio.git/commit/ (Patch, Third Party Advisory)
- lists.debian.org/debian-lts-announce/2023/06/msg00007.html (mailing-list)
Frequently asked questions
- What is CVE-2021-38185?
- CVE-2021-38185 is a high-severity vulnerability in GNU Cpio, classified under Integer Overflow or Wraparound. CVSS score: 7.8/10. Published 2021-08-08.
- How severe is CVE-2021-38185?
- High severity. CVSS v3 base score is 7.8 out of 10.
- Is CVE-2021-38185 known to be exploited?
- 6 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.