CVE-2021-38185
CVE-2021-38185 is a high-severity vulnerability in Gnu Cpio with a CVSS 3.x base score of 7.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-190.
Key facts
- Severity: High (CVSS 3.x base score 7.8)
- CVSS v2: 6.8
- EPSS exploit prediction: 4% (90th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-190
- Affected product: Gnu Cpio
- Published:
- Last modified:
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.
Frequently asked questions
- What is 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.
- How severe is CVE-2021-38185?
- CVE-2021-38185 has a CVSS 3.x base score of 7.8, rated high severity. It is exploitable over local access with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2021-38185 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 4% (90th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-38185?
- CVE-2021-38185 affects Gnu Cpio. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2021-38185?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2021-38185 published?
- CVE-2021-38185 was published on 2021-08-08 and last updated on 2026-06-17.
References
- https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
- https://github.com/fangqyi/cpiopwn
- https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
- https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
- https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
Affected products (1)
- cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*
More vulnerabilities in Gnu Cpio
- CVE-2019-14866 — High (CVSS 7.3): In all versions of cpio before 2.13 does not properly validate input files when generating TAR archives. When cpio is…
- CVE-2010-4226 — High (CVSS 7.2): cpio, as used in build 2007.05.10, 2010.07.28, and possibly other versions, allows remote attackers to overwrite…
- CVE-2010-0624 — Medium (CVSS 6.8): Heap-based buffer overflow in the rmt_read__ function in lib/rtapelib.c in the rmt client functionality in GNU tar…
- CVE-2016-2037 — Medium (CVSS 6.5): The cpio_safer_name_suffix function in util.c in cpio 2.11 allows remote attackers to cause a denial of service…
- CVE-2023-7216 — Medium (CVSS 5.3): A path traversal vulnerability was found in the CPIO utility. This issue could allow a remote unauthenticated attacker…
- CVE-2014-9112 — Medium (CVSS 5.0): Heap-based buffer overflow in the process_copy_in function in GNU Cpio 2.11 allows remote attackers to cause a denial…
Other CWE-190 (Integer Overflow or Wraparound) vulnerabilities
- CVE-2026-4689 — Critical (CVSS 10.0): Sandbox escape due to incorrect boundary conditions, integer overflow in the XPCOM component. This vulnerability was…
- CVE-2026-24814 — Critical (CVSS 10.0): Integer Overflow or Wraparound vulnerability in swoole swoole-src (thirdparty/hiredis modules). This vulnerability is…
- CVE-2025-64721 — Critical (CVSS 10.0): Sandboxie is a sandbox-based isolation software for 32-bit and 64-bit Windows NT-based operating systems. In versions…
- CVE-2015-5108 — Critical (CVSS 10.0): Integer overflow in Adobe Reader and Acrobat 10.x before 10.1.15 and 11.x before 11.0.12, Acrobat and Acrobat Reader DC…
- CVE-2015-5097 — Critical (CVSS 10.0): Integer overflow in Adobe Reader and Acrobat 10.x before 10.1.15 and 11.x before 11.0.12, Acrobat and Acrobat Reader DC…
- CVE-2013-2555 — Critical (CVSS 10.0): Integer overflow in Adobe Flash Player before 10.3.183.75 and 11.x before 11.7.700.169 on Windows and Mac OS X, before…
Browse all CWE-190 (Integer Overflow or Wraparound) vulnerabilities →