CVE-2021-38185 in Gnu Cpio and 22 more products
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.
Affects 23 products from 2 vendors. Description from NVD and MITRE.
Requires local access, low complexity, no authentication required, requires user interaction, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Gnu | Cpio | ≤ 2.13 |
| Siemens | RUGGEDCOM Rox MX5000 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1400 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1500 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1501 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1510 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1511 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1512 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX5000 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1524 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox RX1536 (device and firmware) | < 2.17.0 |
| Siemens | RUGGEDCOM Rox MX5000RE (device and firmware) | < 2.17.0 |
Fix and vendor advisory
- Update to V2.17.0 or later version
Source: SSA-202008
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Record details
| CVE ID | CVE-2021-38185 |
|---|---|
| BreachSpider ID | BS-2021-GLOBAL-304802-H |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Published | 2021-08-08 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Compensating controls AI-drafted, review before use
Implement strict input validation and sanitization for pattern files used with the cpio command. Ensure that only trusted users have the ability to execute cpio with the -E option.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Check devices from your own code or AI agent: free 14-day trial
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.