CVE-2021-38185: gnu cpio Integer Overflow or Wraparound
Vulnerability summary
CVE-2021-38185 is a high (CVSS 7.8) Integer Overflow or Wraparound vulnerability in gnu cpio. EPSS estimates a 4.17% chance of exploitation in the next 30 days, higher than 90.7% of scored vulnerabilities. 3 public exploits are recorded.
Advisory lineage
Upstream 0 · Downstream 2 · Related 1Timeline
- 07-08-2021PublishedVulnerability first disclosed.
- 09-06-2025Last modifiedVulnerability information updated.
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 metrics
6 scores · 5 sources · 2 versions- OSV · Red hatEcosystem advisory · calculated7.0HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
4.17%
Chance of exploitation in the next 30 days
Percentile
91%
Versus all other CVEs
30-day change
0.00 pp
From 4.17% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
3 foundCpiopwn
Maturity: poc
Exploit Reference (lists.gnu.org)
Maturity: unknown
Exploit Reference (lists.gnu.org)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Suse31 products
- cpio&distro=HPE Helion OpenStack 8< 2.11-36.12.1 | < 2.11-36.9.1 | < 2.11-36.15.1
- cpio&distro=SUSE Enterprise Storage 6< 2.12-3.9.1
- cpio&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS< 2.12-3.9.1
- cpio&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS< 2.12-3.9.1
- cpio&distro=SUSE Linux Enterprise High Performance Computing 15-ESPOS< 2.12-3.9.1
Redhat3 products
- cpio< 0:2.12-11.el8
- cpio-debuginfo< 0:2.12-11.el8
- cpio-debugsource< 0:2.12-11.el8
Debian1 product
- cpio< 2.13+dfsg-5
Gnu1 product
- cpio≤ 2.13
Mageia1 product
- cpio< 2.13-5.1.mga8
Ubuntu1 product
- cpio< 2.12+dfsg-6ubuntu0.18.04.4 | < 2.13+dfsg-2ubuntu0.3 | < 2.11+dfsg-5ubuntu1.1+esm1 | < 2.11+dfsg-1ubuntu1.2+esm2 | < 2.13+dfsg-4ubuntu4
6 vendors · 38 products
References
31 links- git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061bPatchThird Party Advisory