{"id":"CVE-2021-38185","state":"PUBLISHED","title":"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 ","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.","publishedAt":"2021-08-07T00:00:00.000Z","updatedAt":"2025-06-09T15:11:29.808Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"mitre","products":["n/a n/a"],"affected":[{"vendor":"n/a","product":"n/a","versions":[{"version":"n/a","status":"affected"}]}],"references":["https://github.com/fangqyi/cpiopwn","https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html","https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html"],"weaknesses":["CWE-190"],"ingestedAt":"2026-10-29T19:48:49.871Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/38xxx/CVE-2021-38185.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-38185","state":"PUBLISHED","datePublished":"2021-08-07T00:00:00.000Z","dateUpdated":"2025-06-09T15:11:29.808Z","assignerShortName":"mitre","assignerOrgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","dateReserved":"2021-08-07T00:00:00.000Z"},"containers":{"cna":{"descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"n/a","product":"n/a","versions":[{"version":"n/a","status":"affected"}]}],"references":[{"url":"https://github.com/fangqyi/cpiopwn"},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html"},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html"},{"url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b"},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html","name":"[debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security update","tags":["mailing-list"]}],"problemTypes":[{"descriptions":[{"type":"text","lang":"en","description":"n/a"}]}],"providerMetadata":{"shortName":"mitre","orgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","dateUpdated":"2023-06-04T00:00:00.000Z"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/fangqyi/cpiopwn","tags":["x_transferred"]},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","tags":["x_transferred"]},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html","tags":["x_transferred"]},{"url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html","name":"[debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security update","tags":["mailing-list","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T01:37:16.303Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"REQUIRED","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2025-06-09T15:10:43.041535Z","id":"CVE-2021-38185","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-190","type":"CWE","lang":"en","description":"CWE-190 Integer Overflow or Wraparound"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-06-09T15:11:29.808Z"}}]}}}