CVE-2021-38185
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
02 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
03 Exploitation and scoring
- Exploitation
- Assessed, none found. CISA's assessment recorded neither public exploit code nor evidence of exploitation when it was made.
- SSVC decision
- ExploitationnoneCISA recorded no public exploit code and no evidence of exploitation.
- AutomatablenoAt least one step from reconnaissance to exploitation cannot be reliably automated.
- Technical ImpacttotalSuccessful exploitation gives total control of the vulnerable component.
- EPSS probability
- 4.16% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 90.7% of scored records. A rank, not a probability.
- NVD base score
- 7.8 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- NVD analysis status
- Modified. NVD last modified this record on 2026-06-17.
- Red Hat severity
- Moderate. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2021-08-07 00:00Z5 YR AGO
- Last updated
- 2025-06-09 15:11Z1 YR AGO
- Reserved
- 2021-08-07
- Assigning CNA
- mitre
- Record state
- PUBLISHED
- Severity
- High (CVSS 7.8)
- CNA CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses
- Data version
- 5.1
- Document digest
- 6433d96e57b6ae4a19dd99280107b49fa1faa1c2c37bc575429cbeaaa0f8bc48
05 Affected products
06 References
- github.comhttps://github.com/fangqyi/cpiopwn
- lists.gnu.orghttps://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
- lists.gnu.orghttps://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
- git.savannah.gnu.orghttps://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
- lists.debian.org[debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security updatehttps://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
07 Fixed in
AlmaLinux 8
- cpio Fixed in 2.12-11.el8
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Arch Linux
- cpio No fix yet
Source: Arch Linux Security Tracker, the Arch Linux security team. Reformatted by exploit.cc.
CloudLinux 8
- cpio Fixed in 2.12-11.el8
Derived from AlmaLinux 8. Partial coverage: only packages taken from AlmaLinux 8 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Debian 12
- cpio Fixed in 2.13+dfsg-5
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 13
- cpio Fixed in 2.13+dfsg-5
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 14
- cpio Fixed in 2.13+dfsg-5
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 18.04 LTS
- cpio Fixed in 2.12+dfsg-6ubuntu0.18.04.4
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 20.04 LTS
- cpio Fixed in 2.13+dfsg-2ubuntu0.3
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 22.04 LTS
- cpio Fixed in 2.13+dfsg-4ubuntu4
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 14.04 LTS
- cpio Fixed in 2.11+dfsg-1ubuntu1.2+esm2Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 16.04 LTS
- cpio Fixed in 2.11+dfsg-5ubuntu1.1+esm1Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
A release or ecosystem missing from this list has no record here. It may be unaffected or not covered by the source. Source notices and licences.