{"api_version":"1","generated_at":"2026-04-22T21:38:52+00:00","cve":"CVE-2021-38185","urls":{"html":"https://cve.report/CVE-2021-38185","api":"https://cve.report/api/cve/CVE-2021-38185.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-38185","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-38185"},"summary":{"title":"CVE-2021-38185","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.","state":"PUBLIC","assigner":"cve@mitre.org","published_at":"2021-08-08 00:15:00","updated_at":"2023-06-04 22:15:00"},"problem_types":["CWE-190"],"metrics":[],"references":[{"url":"https://github.com/fangqyi/cpiopwn","name":"https://github.com/fangqyi/cpiopwn","refsource":"MISC","tags":[],"title":"GitHub - fangqyi/cpiopwn: ACE poc exploit for glibc cpio 2.13 through mmap chunk metadata curruption","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","name":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","refsource":"MISC","tags":[],"title":"cpio.git - GNU cpio","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","name":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","refsource":"MISC","tags":[],"title":"cpio RCE Exploit Caused by Integer Overflow","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html","name":"[debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 3445-1] cpio security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html","name":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html","refsource":"MISC","tags":[],"title":"Re: cpio RCE Exploit Caused by Integer Overflow","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-38185","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38185","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"38185","vulnerable":"1","versionEndIncluding":"2.13","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"cpio","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-38185","qid":"159796","title":"Oracle Enterprise Linux Security Update for cpio (ELSA-2022-1991)"},{"cve":"CVE-2021-38185","qid":"181827","title":"Debian Security Update for cpio (DLA 3445-1)"},{"cve":"CVE-2021-38185","qid":"183753","title":"Debian Security Update for cpio (CVE-2021-38185)"},{"cve":"CVE-2021-38185","qid":"198484","title":"Ubuntu Security Notification for GNU cpio Vulnerability (USN-5064-1)"},{"cve":"CVE-2021-38185","qid":"199639","title":"Ubuntu Security Notification for GNU cpio Vulnerability (USN-5064-3)"},{"cve":"CVE-2021-38185","qid":"240271","title":"Red Hat Update for cpio (RHSA-2022:1991)"},{"cve":"CVE-2021-38185","qid":"354707","title":"Amazon Linux Security Advisory for cpio : ALAS2022-2023-263"},{"cve":"CVE-2021-38185","qid":"354786","title":"Amazon Linux Security Advisory for cpio : ALAS2-2023-1972"},{"cve":"CVE-2021-38185","qid":"355140","title":"Amazon Linux Security Advisory for cpio : ALAS2023-2023-021"},{"cve":"CVE-2021-38185","qid":"501831","title":"Alpine Linux Security Update for cpio"},{"cve":"CVE-2021-38185","qid":"504656","title":"Alpine Linux Security Update for cpio"},{"cve":"CVE-2021-38185","qid":"670812","title":"EulerOS Security Update for cpio (EulerOS-SA-2021-2706)"},{"cve":"CVE-2021-38185","qid":"670946","title":"EulerOS Security Update for cpio (EulerOS-SA-2021-2681)"},{"cve":"CVE-2021-38185","qid":"671036","title":"EulerOS Security Update for cpio (EulerOS-SA-2021-2654)"},{"cve":"CVE-2021-38185","qid":"671045","title":"EulerOS Security Update for cpio (EulerOS-SA-2021-2626)"},{"cve":"CVE-2021-38185","qid":"750962","title":"SUSE Enterprise Linux Security Update for cpio (SUSE-SU-2021:2686-1)"},{"cve":"CVE-2021-38185","qid":"750966","title":"SUSE Enterprise Linux Security Update for cpio (SUSE-SU-2021:2689-1)"},{"cve":"CVE-2021-38185","qid":"750968","title":"OpenSUSE Security Update for cpio (openSUSE-SU-2021:2689-1)"},{"cve":"CVE-2021-38185","qid":"750996","title":"SUSE Enterprise Linux Security Update for cpio (SUSE-SU-2021:2808-1)"},{"cve":"CVE-2021-38185","qid":"900299","title":"CBL-Mariner Linux Security Update for cpio 2.13"},{"cve":"CVE-2021-38185","qid":"901141","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for cpio (6357)"},{"cve":"CVE-2021-38185","qid":"902078","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for cpio (6357-1)"},{"cve":"CVE-2021-38185","qid":"903152","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for cpio (5208)"},{"cve":"CVE-2021-38185","qid":"940501","title":"AlmaLinux Security Update for cpio (ALSA-2022:1991)"},{"cve":"CVE-2021-38185","qid":"960367","title":"Rocky Linux Security Update for cpio (RLSA-2022:1991)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2021-38185","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"url":"https://github.com/fangqyi/cpiopwn","refsource":"MISC","name":"https://github.com/fangqyi/cpiopwn"},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","refsource":"MISC","name":"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","refsource":"MISC","name":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html"},{"url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","refsource":"MISC","name":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b"},{"refsource":"MLIST","name":"[debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security update","url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html"}]}},"nvd":{"publishedDate":"2021-08-08 00:15:00","lastModifiedDate":"2023-06-04 22:15:00","problem_types":["CWE-190"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":7.8,"baseSeverity":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":6.8},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*","versionEndIncluding":"2.13","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"38185","Ordinal":"213797","Title":"CVE-2021-38185","CVE":"CVE-2021-38185","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"38185","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"38185","Ordinal":"2","NoteData":"2021-08-07","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"38185","Ordinal":"3","NoteData":"2021-08-07","Type":"Other","Title":"Modified"}]}}}