CVE-2021-38185
published high CVSS 3.1 · 7.8cpio: integer overflow in ds_fgetstr() in dstring.c can lead to an out-of-bounds write via a crafted pattern file
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| Amazon Linux | AL2 | Release evaluationALAS2-2023-1972 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2023-021 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 8 | cpio | Advisory build | 2.12-11.el8 | ALSA-2022:1991 |
| Alpine Linux | edge | cpio | Fixed | 2.13-r2 | Package fix record |
| Debian | buster | cpio | Advisory build | 2.12+dfsg-9+deb10u1 | DLA-3445-1 |
| Oracle Linux | 8 | cpioaarch64 | Advisory build | 0:2.12-11.el8 | ELSA-2022-1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpioaarch64 | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
Show 95 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-11-SP3 | cpioi586 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| Ubuntu | bionic | cpio | Advisory build | 2.12+dfsg-6ubuntu0.18.04.4 | USN-5064-1 |
| Alpine Linux | v3.14 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.15 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.16 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.17 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.18 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.19 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.20 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.21 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.22 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.23 | cpio | Fixed | 2.13-r2 | Package fix record |
| Alpine Linux | v3.24 | cpio | Fixed | 2.13-r2 | Package fix record |
| Oracle Linux | 8 | cpiox86_64 | Advisory build | 0:2.12-11.el8 | ELSA-2022-1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpioppc64le | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpios390x | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpiosrc | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpiox86_64 | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debuginfoaarch64 | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debuginfoppc64le | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debuginfos390x | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debuginfox86_64 | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debugsourceaarch64 | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debugsourceppc64le | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debugsources390x | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| Red Hat Enterprise Linux | RHEL-8 | cpio-debugsourcex86_64 | Advisory build | 2.12-11.el8 | RHSA-2022:1991 |
| SUSE / openSUSE | SLE-11-SP3 | cpioi586 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP3 | cpio-langi586 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP3 | cpio-langi586 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpioi586 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpioi586 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpioppc64 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpioppc64 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpios390x | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpios390x | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpiox86_64 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpiox86_64 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langi586 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langi586 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langppc64 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langppc64 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langs390x | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langs390x | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langx86_64 | Advisory build | 2.9-75.81.14.1 | SUSE-SU-2021:14788-1 |
| SUSE / openSUSE | SLE-11-SP4 | cpio-langx86_64 | Advisory build | 2.9-75.81.8.1 | SUSE-SU-2021:14777-1 |
| SUSE / openSUSE | SLE-12-SP2 | cpiox86_64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP2 | cpiox86_64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP2 | cpio-langnoarch | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP2 | cpio-langnoarch | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpioaarch64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpioaarch64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpioppc64le | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpioppc64le | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpios390x | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpios390x | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpiox86_64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpiox86_64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpio-langnoarch | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP3 | cpio-langnoarch | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpioaarch64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpioaarch64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpioppc64le | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpioppc64le | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpios390x | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpios390x | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpiox86_64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpiox86_64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpio-langnoarch | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP4 | cpio-langnoarch | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpioaarch64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpioaarch64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpioppc64le | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpioppc64le | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpios390x | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpios390x | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpiox86_64 | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpiox86_64 | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpio-langnoarch | Advisory build | 2.11-36.15.1 | SUSE-SU-2021:2808-1 |
| SUSE / openSUSE | SLE-12-SP5 | cpio-langnoarch | Advisory build | 2.11-36.9.1 | SUSE-SU-2021:2686-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpioaarch64 | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpioppc64le | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpios390x | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpiox86_64 | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-langaarch64 | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-langppc64le | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-langs390x | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-langx86_64 | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-mtaarch64 | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-mtppc64le | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-mts390x | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | cpio-mtx86_64 | Advisory build | 2.13-3.3 | OPENSUSE-SU-2024:10697-1 |
| Ubuntu | bionic | cpio-win32 | Advisory build | 2.12+dfsg-6ubuntu0.18.04.4 | USN-5064-1 |
| Ubuntu | esm | cpio | Advisory build | 2.11+dfsg-1ubuntu1.2+esm2 | USN-5064-3 |
| Ubuntu | focal | cpio | Advisory build | 2.13+dfsg-2ubuntu0.3 | USN-5064-1 |
| Ubuntu | focal | cpio-win32 | Advisory build | 2.13+dfsg-2ubuntu0.3 | USN-5064-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
2- n/a
- CWE-190 CWE-190 Integer Overflow or Wraparound
References
5- https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
- https://github.com/fangqyi/cpiopwn
- [debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security update https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
- https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
- https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
Provider assertions
3mitre · cna
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- b8049df45dff8243b79136bd68a1460c1bd1ae4b469deff7f0e901d08d2589dd
- Ingested
- 23 Sep 2026, 07:55:21 UTC
- Source record
- Official CVE record