{"id":"CVE-2021-38185","aliases":["CVE-2021-38185"],"related":[],"kind":"vulnerability","state":"published","title":"GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c dsfgetstr integer overf…","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"GNU cpio versiones hasta 2.13, permite a atacantes ejecutar código arbitrario por medio de un archivo de patrones diseñado, debido a un desbordamiento de enteros en el archivo dstring.c en la función  ds_fgetstr que desencadena una escritura de pila fuera de límites. NOTA: no está claro si hay casos comunes en los que el archivo de patrones, asociado con la opción -E, son datos no confiables","source":"nvd"}],"published":"2021-08-07T00:00:00.000Z","modified":"2026-06-17T04:01:42.950Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"status":"affected","lastAffected":"2.13"}],"vendor":"gnu","product":"cpio","cpe":"cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/fangqyi/cpiopwn","tags":["exploit","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html","tags":["exploit","mailing-list","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html","tags":["exploit","mailing-list","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-06-09T15:10:43.041Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-38185","url":"https://www.cve.org/CVERecord?id=CVE-2021-38185","licence":"CVE Terms of Use","modified":"2025-06-09T15:11:29.808Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-38185","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38185","licence":"Public domain","modified":"2026-06-17T04:01:42.950Z"}],"updatedAt":"2026-11-25T22:58:03.052Z","epss":{"score":0.04165,"percentile":0.91121,"date":"2026-12-01T12:00:22.000Z"}}