# CVE-2021-38185

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-08-07 · Modified: 2025-06-09
- Aliases: MGASA-2021-0423, SUSE-RU-2021:2779-1, SUSE-RU-2021:2780-1, SUSE-SU-2021:14777-1, SUSE-SU-2021:14788-1, SUSE-SU-2021:2686-1, SUSE-SU-2021:2808-1, RHSA-2022:1991, UBUNTU-CVE-2021-38185, USN-5064-1, USN-5064-2, USN-5064-3, DEBIAN-CVE-2021-38185, ALPINE-CVE-2021-38185
- Record: https://cvemate.com/vulnerability/CVE-2021-38185 · JSON: https://cvemate.com/vulnerability/CVE-2021-38185/json

## 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.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 4.165%, percentile 91.171%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 3 (github, reference)

## Affected (first 20 of 39)

- alpine cpio (Alpine Linux): \< 2.13-r2
- debian cpio (Debian): \< 2.13+dfsg-5
- ubuntu cpio (Ubuntu): \< 2.11+dfsg-1ubuntu1.2+esm2 \| \< 2.11+dfsg-5ubuntu1.1+esm1 \| \< 2.12+dfsg-6ubuntu0.18.04.4 \| \< 2.13+dfsg-2ubuntu0.3 \| \< 2.13+dfsg-4ubuntu4
- gnu cpio: ≤ 2.13
- mageia cpio (Mageia): \< 2.13-5.1.mga8
- redhat cpio (Red Hat): \< 0:2.12-11.el8
- redhat cpio-debuginfo (Red Hat): \< 0:2.12-11.el8
- redhat cpio-debugsource (Red Hat): \< 0:2.12-11.el8
- suse cpio&distro=HPE Helion OpenStack 8 (SUSE Linux Enterprise): \< 2.11-36.12.1 \| \< 2.11-36.9.1 \| \< 2.11-36.15.1
- suse cpio&distro=SUSE Enterprise Storage 6 (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise High Performance Computing 15-ESPOS (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise High Performance Computing 15-LTSS (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise Micro 5.0 (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise Module for Basesystem 15 SP2 (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise Module for Basesystem 15 SP3 (SUSE Linux Enterprise): \< 2.12-3.9.1
- suse cpio&distro=SUSE Linux Enterprise Point of Sale 11 SP3 (SUSE Linux Enterprise): \< 2.9-75.81.8.1 \| \< 2.9-75.81.14.1
- suse cpio&distro=SUSE Linux Enterprise Server 11 SP4-LTSS (SUSE Linux Enterprise): \< 2.9-75.81.8.1 \| \< 2.9-75.81.14.1
- suse cpio&distro=SUSE Linux Enterprise Server 12 SP2-BCL (SUSE Linux Enterprise): \< 2.11-36.12.1 \| \< 2.11-36.9.1 \| \< 2.11-36.15.1

## References (first 20 of 32)

- <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>
- <https://advisories.mageia.org/MGASA-2021-0423.html>
- <https://bugs.mageia.org/show_bug.cgi?id=29366>
- <https://lists.suse.com/pipermail/sle-security-updates/2021-August/009282.html>
- <https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/XORUFH2I27QQWZXGSRUKWLXW5NX5KLXA/>
- <https://ubuntu.com/security/notices/USN-5064-1>
- <https://www.suse.com/support/update/announcement/-2021-2779/suse-ru-20212779-1/>
- <https://bugzilla.suse.com/1189465>
- <https://www.suse.com/security/cve/CVE-2021-38185>
- <https://www.suse.com/support/update/announcement/-2021-2780/suse-ru-20212780-1/>
- <https://www.suse.com/support/update/announcement/2021/suse-su-202114777-1/>
- <https://bugzilla.suse.com/1189206>
- <https://www.suse.com/support/update/announcement/2021/suse-su-202114788-1/>
- <https://www.suse.com/support/update/announcement/2021/suse-su-20212686-1/>
- <https://www.suse.com/support/update/announcement/2021/suse-su-20212808-1/>
- <https://access.redhat.com/errata/RHSA-2022:1991>

---

Data as of 2026-12-05T03:09:52.361Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
