CVE-2021-38185
7.8 HIGHGNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c ds_fgetstr integer ov...
Published: 2021-08-08 · Last updated: 2026-06-17
Severity and scoring
- CVSS
- 7.8 HIGH
- Vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CWE
- CWE-190
Affected products
| Vendor | Product |
|---|---|
| gnu | cpio |
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.
Source: NVD
References
- [NVD]https://nvd.nist.gov/vuln/detail/CVE-2021-38185
- [Patch]https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
- [Exploit reference]https://github.com/fangqyi/cpiopwn
- [Other]https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
- [Vendor advisory]https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
- [Vendor advisory]https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
- [Patch]https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
- [Exploit reference]https://github.com/fangqyi/cpiopwn
- [Other]https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
- [Vendor advisory]https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
- [Vendor advisory]https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
Related CVEs
Same vendor
- CVE-2026-42009 — A flaw was found in gnutls (7.5 HIGH)
- CVE-2026-42010 — A flaw was found in gnutls (7.1 HIGH)
- CVE-2026-3833 — A flaw was found in gnutls (6.5 MEDIUM)
- CVE-2026-3832 — A flaw was found in gnutls (3.7 LOW)
- CVE-2026-33845 — A flaw in GnuTLS DTLS handshake parsing allows malformed fragments with zero length and non-zero offset, leading to an integer underflow ... (7.5 HIGH)
Same CWE
- CVE-2026-10649 — A flaw was found in Pacemaker (8.6 HIGH)
- CVE-2026-53705 — A flaw was found in GStreamer's WavPack audio decoder in gst-plugins-good (7.6 HIGH)
- CVE-2026-52722 — A signed integer overflow vulnerability was found in GStreamer's VMnc decoder (7.1 HIGH)
- CVE-2025-55647 — An Out-of-Memory in the mp4_mux_cenc_insert_pssh function (filters/mux_isom.c) of GPAC MP4Box v2.4 allows attackers to cause a Denial of ... (5.5 MEDIUM)
- CVE-2026-6045 — LibreOffice can import EMF+ graphics, which may be embedded in documents