# CVE-2021-38185: cpio: The cpio packages provide the GNU cpio utility for creating and extracting archives, or copying files from one place...

CVE-2021-38185 is fixed in 4 products on 1 platform, first by cpio 2.12+dfsg-6ubuntu0.18.04.4, released August 7, 2021. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2021-38185
- Priority: High
- CVSS: 7.8 (Moderate)
- EPSS: 0.0417
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Aug 7, 2021

## Description

The cpio packages provide the GNU cpio utility for creating and extracting archives, or copying files from one place to another.  Security Fix(es):  * cpio: integer overflow in ds_fgetstr() in dstring.c can lead to an out-of-bounds write via a crafted pattern file (CVE-2021-38185)  For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.  Additional Changes:  For detailed information on changes in this release, see the Red Hat Enterprise Linux 8.6 Release Notes linked from the References section.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | cpio RHEL 8 | 0:2.12-11.el8 | [RHSA-2022:1991](https://patchblox.com/security/data/fix/linux/rhsa-2022-1991.md) | May 10, 2022 |
| Linux | cpio Ubuntu 18.04.6 LTS (bionic) | 2.12+dfsg-6ubuntu0.18.04.4 | [cpio 2.12+dfsg-6ubuntu0.18.04.4](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-cpio-2.12-dfsg-6ubuntu0.18.04.4.md) | Aug 7, 2021 |
| Linux | cpio Ubuntu 20.04 LTS (focal) | 2.13+dfsg-2ubuntu0.3 | [cpio 2.13+dfsg-2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-focal-cpio-2.13-dfsg-2ubuntu0.3.md) | Aug 7, 2021 |
| Linux | cpio Ubuntu 22.04.1 LTS (jammy) | 2.13+dfsg-4ubuntu4 | [cpio 2.13+dfsg-4ubuntu4](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-cpio-2.13-dfsg-4ubuntu4.md) | Aug 7, 2021 |
| Linux | cpio almalinux 8 | 2.12-11.el8 | [ALSA-2022:1991](https://patchblox.com/security/data/fix/linux/alsa-2022-1991.md) | May 10, 2022 |
| Linux | cpio amzn 2023 | 2.13-13.amzn2023.0.2 | [ALAS2023-2023-021](https://patchblox.com/security/data/fix/linux/alas2023-2023-021.md) | Feb 17, 2023 |
| Linux | cpio ol 8 | 0:2.12-11.el8 | [ELSA-2022-1991](https://patchblox.com/security/data/fix/linux/elsa-2022-1991.md) | May 17, 2022 |
| Linux | cpio rocky 8 | 0:2.12-11.el8 | [RLSA-2022:1991](https://patchblox.com/security/data/fix/linux/rlsa-2022-1991.md) | May 10, 2022 |
| Linux | cpio-debuginfo amzn 2023 | 2.13-13.amzn2023.0.2 | [ALAS2023-2023-021](https://patchblox.com/security/data/fix/linux/alas2023-2023-021.md) | Feb 17, 2023 |
| Linux | cpio-debugsource amzn 2023 | 2.13-13.amzn2023.0.2 | [ALAS2023-2023-021](https://patchblox.com/security/data/fix/linux/alas2023-2023-021.md) | Feb 17, 2023 |
| Linux | cpio-win32 Ubuntu 18.04.6 LTS (bionic) | 2.12+dfsg-6ubuntu0.18.04.4 | [cpio-win32 2.12+dfsg-6ubuntu0.18.04.4](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-cpio-win32-2.12-dfsg-6ubuntu0.18.04.4.md) | Aug 7, 2021 |
| Linux | cpio-win32 Ubuntu 20.04 LTS (focal) | 2.13+dfsg-2ubuntu0.3 | [cpio-win32 2.13+dfsg-2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-focal-cpio-win32-2.13-dfsg-2ubuntu0.3.md) | Aug 7, 2021 |
| Linux | cpio-win32 Ubuntu 22.04.1 LTS (jammy) | 2.13+dfsg-4ubuntu4 | [cpio-win32 2.13+dfsg-4ubuntu4](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-cpio-win32-2.13-dfsg-4ubuntu4.md) | Aug 7, 2021 |

---

Data as of 2026-11-09T01:18:40Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
