CVE-2021-38185
cpio: integer overflow in ds_fgetstr() in dstring.c can lead to an out-of-bounds write via a crafted pattern file
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 6, 2021
Updated · February 24, 2026
Description
A flaw was found in cpio. An integer overflow that triggers an out-of-bounds heap write can allow an attacker to execute arbitrary code via a crafted pattern file. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Statement
cpio on Red Hat Enterprise Linux 8 is compiled with full RELRO, which mitigates the exploitation technique demonstrated in the report. Additionally, this requires the use of an unusual set of parameters.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-787 · Out-of-bounds Write