{"id":"CVE-2021-38185","details":"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.","modified":"2026-04-16T04:31:30.159117198Z","published":"2021-08-08T00:15:07.027Z","related":["ALSA-2022:1991","SUSE-RU-2021:2779-1","SUSE-RU-2021:2780-1","SUSE-SU-2021:14777-1","SUSE-SU-2021:14788-1","SUSE-SU-2021:2686-1","SUSE-SU-2021:2689-1","SUSE-SU-2021:2808-1","openSUSE-SU-2024:10697-1"],"references":[{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html"},{"type":"FIX","url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b"},{"type":"EVIDENCE","url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html"},{"type":"EVIDENCE","url":"https://github.com/fangqyi/cpiopwn"},{"type":"EVIDENCE","url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html"}],"affected":[{"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-38185.json","unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"2.13"}]}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}