CVE-2021-38185
A public proof of concept exists; no exploitation attested.
- Published2021-08-08
- WeaknessCWE-190
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2021-08-0800:15CVE publishedNVD
Observed activity
isMalicious corpus · updated 2026-11-03 21:37 UTCBlock these indicators
- Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-38185?format=txt
- CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-38185?format=csv
- TAXII collection of exploited CVEs
- The EDL and CSV take an API key on the Pro plan.
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 2.13 | ≤ 2.13 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- cpioUbuntu:Pro:16.04:LTSall versions · fixed in 2.11+dfsg-5ubuntu1.1+esm1
- cpioUbuntu:Pro:14.04:LTSall versions · fixed in 2.11+dfsg-1ubuntu1.2+esm2
- cpioUbuntu:22.04:LTSall versions · fixed in 2.13+dfsg-4ubuntu4
- cpioUbuntu:20.04:LTSall versions · fixed in 2.13+dfsg-2ubuntu0.3
- cpioUbuntu:18.04:LTSall versions · fixed in 2.12+dfsg-6ubuntu0.18.04.4
- cpioSUSE:OpenStack Cloud Crowbar 9all versions · fixed in 2.11-36.12.1
- cpioSUSE:OpenStack Cloud Crowbar 9all versions · fixed in 2.11-36.15.1
- cpioSUSE:OpenStack Cloud Crowbar 9all versions · fixed in 2.11-36.9.1
80 more package ranges on OSV.dev
Vendor advisories
cpio: integer overflow in ds_fgetstr() in dstring.c can lead to an out-of-bounds write via a crafted pattern file
cpio.src as a component of Red Hat Enterprise Linux 6 · cpio as a component of Red Hat Enterprise Linux 7 · cpio.src as a component of Red Hat Enterprise Linux 7
SSA-202008: Multiple Vulnerabilities in Ruggedcom Rox Before V2.17.0
RUGGEDCOM ROX MX5000 · RUGGEDCOM ROX MX5000RE · RUGGEDCOM ROX RX1400 · +8 more
Red Hat Security Advisory: cpio security update
Fix
- Vendor fix Siemens ProductCERT SSA-202008 · 11 productsUpdate to V2.17.0 or later version
- Vendor fix Red Hat Product Security RHSA-2022:1991 · 13 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- No fix planned, says the vendor Red Hat Product Security CVE-2021-38185 · 3 productsOut of support scope
Advisories and patches
- git.savannah.gnu.orgPatch
- lists.gnu.orgVendor Advisory
- lists.gnu.orgVendor Advisory
Detection
read 2026-11-03 22:42 UTC- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2025-06-09
- OpenCVESSVC decisionnone—
- CISA-ADPCVSS 3.17.82025-06-09
- NVDCVSS 3.17.8read 2026-10-23
- NVDCVSS 2.06.8read 2026-10-23
- CISA-ADPweakness (CWE)CWE-1902025-06-09
- NVDweakness (CWE)CWE-190read 2026-10-23
- FIRST EPSSEPSS score4.2 %2026-11-03
- PoC-in-GitHubproof of concept1read 2026-11-03
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-6357same flawAzure Linux · MIT
- EUVD-2021-24655same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-pp74-ghrg-jwfhsame flawGitHub Advisory Database · CC-BY-4.0
- ALSA-2022:1991advisory covering several CVEsAlmaLinux · MIT
- DLA-3445-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0423advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1325advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2024:10697-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2022:1991advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2022:1991advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-RU-2021:2779-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-RU-2021:2780-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:14777-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:14788-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:2686-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:2808-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-5064-1advisory covering several CVEsUbuntu
- USN-5064-2advisory covering several CVEsUbuntu
- USN-5064-3advisory covering several CVEsUbuntu
Technical details
- CVSS v3 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
- NVD status
- Modified
- GitHub Advisory
- GHSA-pp74-ghrg-jwfh
Frequently asked questions
What is CVE-2021-38185?
Is CVE-2021-38185 actively exploited?
What is the CVSS score for CVE-2021-38185?
Running cpio? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-pp74-ghrg-jwfh
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OpenCVE · OpenCVE terms of service · terms restrict redistribution
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- Siemens ProductCERT (CSAF) · TLP:WHITE (commercial use and redistribution granted)
- CISA Vulnrichment · CC0-1.0