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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | cpio | 2.13+dfsg-5 | — |
| Debian 13 | cpio | 2.13+dfsg-5 | — |
| Debian 12 | cpio | 2.13+dfsg-5 | — |
| Debian 10 | cpio | 2.12+dfsg-9+deb10u1 | DLA-3445-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | cpio | 2.13+dfsg-4ubuntu4 | — |
| Ubuntu 20.04 LTS | cpio | 2.13+dfsg-2ubuntu0.3 | USN-5064-1 |
| Ubuntu 18.04 LTS | cpio | 2.12+dfsg-6ubuntu0.18.04.4 | USN-5064-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | cpio | 2.11+dfsg-5ubuntu1.1+esm1 | USN-5064-2 |
| Ubuntu Pro 14.04 LTS | cpio | 2.11+dfsg-1ubuntu1.2+esm2 | USN-5064-3 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | cpio | 2.12-11.el8 | RHSA-2022:1991 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | cpio | 2.12-11.el8 | ALSA-2022:1991 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | cpio | 2.12-11.el8 | RLSA-2022:1991 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLES 15 SP2 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLES 15 SP1 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLES 15 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLES 12 SP5 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
Show 22 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP4 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SLES 12 SP3 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SLES 12 SP2 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SLES 11 SP4 | cpio | 2.9-75.81.8.1 | SUSE-SU-2021:14788-1, SUSE-SU-2021:14777-1 |
| SLES for SAP 15 SP1 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLES for SAP 15 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLES for SAP 12 SP5 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SLES for SAP 12 SP4 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SLES for SAP 12 SP3 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SLE Micro 5.0 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLE HPC 15 SP1 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SLE HPC 15 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SUSE OpenStack Cloud Crowbar 9 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SUSE OpenStack Cloud Crowbar 8 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SUSE OpenStack Cloud 9 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SUSE OpenStack Cloud 8 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SUSE Manager Server 4.0 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SUSE Manager Retail Branch Server 4.0 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SUSE Manager Proxy 4.0 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
| SUSE Linux Enterprise Point of Sale 11 SP3 | cpio | 2.9-75.81.8.1 | SUSE-SU-2021:14788-1, SUSE-SU-2021:14777-1 |
| SUSE HPE Helion OpenStack 8 | cpio | 2.11-36.9.1 | SUSE-SU-2021:2808-1, SUSE-SU-2021:2686-1, SUSE-RU-2021:2779-1 |
| SUSE Enterprise Storage 6 | cpio | 2.12-3.9.1 | SUSE-RU-2021:2780-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | cpio | 2.13-3.3 | openSUSE-SU-2024:10697-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | cpio | 2.13-r2 | — |
| Alpine v3.23 | cpio | 2.13-r2 | — |
| Alpine v3.22 | cpio | 2.13-r2 | — |
| Alpine v3.21 | cpio | 2.13-r2 | — |
| Alpine v3.20 | cpio | 2.13-r2 | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | cpio | 2.13-r2 | — |
| Alpine v3.18 | cpio | 2.13-r2 | — |
| Alpine v3.17 | cpio | 2.13-r2 | — |
| Alpine v3.16 | cpio | 2.13-r2 | — |
| Alpine v3.15 | cpio | 2.13-r2 | — |
| Alpine v3.14 | cpio | 2.13-r2 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | cpio | 2.13-13.amzn2023.0.2 | ALAS2023-2023-021 |
| Amazon Linux 2 | cpio | 2.12-11.amzn2 | ALAS2-2023-1972 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 2 (CBL-Mariner) | cpio | 2.13-4 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | cpio | 2.12-11.el8 | ELSA-2022-1991 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
fangqyi/cpiopwn ★ 5 · Jul 19, 2021
ACE poc exploit for glibc cpio 2.13 through mmap chunk metadata curruption (CVE-2021-38185)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 20
- ALSA-2022:1991 Moderate: cpio security update AlmaLinux Security Advisories · Oct 29, 2026
- USN-5064-3 cpio vulnerability Ubuntu Security Notices (USN) · Jun 29, 2026
- USN-5064-2 cpio vulnerability Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-3445-1 cpio - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RHSA-2022:1991 Red Hat Security Advisory: cpio security update Red Hat Security Advisories (RHSA) · Feb 24, 2026
- USN-5064-1 cpio vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
- RLSA-2022:1991 Moderate: cpio security update Rocky Linux Security Advisories · Feb 4, 2026
- SUSE-RU-2021:2779-1 Recommended update for cpio SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:14788-1 Security update for cpio SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:2808-1 Security update for cpio SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-RU-2021:2780-1 Recommended update for cpio SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:2686-1 Security update for cpio SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10697-1 cpio-2.13-3.3 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:14777-1 Security update for cpio SUSE / openSUSE Security Updates · Feb 4, 2026
- NCSC-2025-0382 Kwetsbaarheden verholpen in Siemens producten NCSC-NL (Netherlands) · Dec 9, 2025
- SSA-202008 SSA-202008: Multiple Vulnerabilities in Ruggedcom Rox Before V2.17.0 Siemens ProductCERT · Dec 9, 2025
- WID-SEC-2022-1852 cpio: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Jun 30, 2024
- ALAS2-2023-1972 Moderate: cpio security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Mar 7, 2023
- ALAS2023-2023-021 Moderate: cpio security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 22, 2023
- ELSA-2022-1991 Moderate: cpio security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · May 17, 2022
References
- 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
- [debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security update mailing-list