{"id":"CVE-2021-38185","published":"2021-08-07T00:00:00Z","modified":"2025-06-09T15:11:29Z","title":"GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.04165,"percentile":0.91123,"provenance":"source"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"references":[{"url":"https://github.com/fangqyi/cpiopwn","tags":[]},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","tags":[]},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html","tags":[]},{"url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html","tags":["mailing-list"]}],"priority":{"score":28.7,"factors":[{"name":"EPSS percentile","points":18.22},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.46}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2021-07-19","earliestUrl":"https://github.com/fangqyi/cpiopwn","repos":[{"name":"fangqyi/cpiopwn","url":"https://github.com/fangqyi/cpiopwn","stars":5,"created":"2021-07-19"}]},"first":{"date":"2021-07-19","source":"PoC-in-GitHub","url":"https://github.com/fangqyi/cpiopwn"},"provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-06-09T15:10:43.041535Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"The flaw is an integer overflow in the ds_fgetstr function of dstring.c in GNU cpio, through version 2.13, which causes an out-of-bounds heap write. An attacker who can supply a crafted pattern file, used with the -E option, can execute arbitrary code, and exploitation requires local access, no privileges, and a user to act on the malicious file, though it is unclear how commonly the pattern file is untrusted.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:38:52Z"},"euvd":{"id":"EUVD-2021-24655","exploited":false,"provenance":"source"}}