{"id":"ALPINE-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-11-03T06:31:44.000430021Z","published":"2021-08-08T00:15:07.027Z","upstream":["CVE-2021-38185"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-38185"}],"affected":[{"package":{"name":"cpio","ecosystem":"Alpine:v3.14","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.15","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}},{"package":{"name":"cpio","ecosystem":"Alpine:v3.24","purl":"pkg:apk/alpine/cpio?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13-r2"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-38185.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}