CVE-2021-38185: GNU cpio · Integer Overflow or Wraparound
Source CVE Database V5
Not known to be exploited · CVSS 7.8 High : upgrade to 2.13 soon.
Data as of 26 Oct 2026, 17:16 UTC
- EPSS
- 4.1% chance of exploitation in 30 days – higher than 90% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.13
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 7 Aug 2021
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade the Debian debian/cpio package to 2.13.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Debiandebian/cpiopkg:deb/debian/cpioOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should first verify if GNU cpio is used within their systems and identify versions up to 2.13. If patching is not immediately possible, restrict or monitor the use of the -E option with pattern files, especially when processing files from untrusted sources. Implement strict input validation and sandboxing for any processes handling pattern files to limit potential damage from exploitation. Additionally, enhance endpoint security controls to detect anomalous behavior indicative of exploitation attempts, and educate users about the risks of opening untrusted files. Employing application whitelisting and least privilege principles can further reduce the attack surface. Regularly audit and monitor systems for signs of compromise related to this vulnerability.
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.
References
- github.com/fangqyi/cpiopwn (opens in a new tab)
- lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html (opens in a new tab)
- lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html (opens in a new tab)
- git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b (opens in a new tab)
- lists.debian.org/debian-lts-announce/2023/06/msg00007.html (opens in a new tab)