---
title: "CVE-2021-38185"
canonical_url: "https://pkgseek.com/security/CVE-2021-38185"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# 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 unclear whether there are common cases where the pattern file, associated with the -E option, is untrusted data.

CVE-2021-38185 is rated HIGH (7.8), with 3 indexed affected package builds across 3 distributions.

- **Severity / Score**: HIGH (7.8)
- **Affected builds**: 3
- **Affected distros**: 3
- **Distros with fixed_in**: Alibaba Cloud Linux, Oracle Linux, Ubuntu

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Alibaba Cloud Linux | 3 | cpio | 2.12-10.1.al8 | 2.12-11.0.1.al8 |
| Oracle Linux | 8 | cpio | 2.12-10.el8 | 2.12-11.el8 |
| Ubuntu | focal | cpio | 2.13+dfsg-2 | 2.13+dfsg-2ubuntu0.3 |
