Skip to main content
VulnerabilityPublished Updated

CVE-2021-38185: GNU cpio · Integer Overflow or Wraparound

Source CVE Database V5

0

Not known to be exploited · CVSS 7.8 High : upgrade to 2.13 soon.

Data as of 26 Oct 2026, 14:05 UTC

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 7 Aug 2021

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Debiandebian/cpiopkg:deb/debian/cpioOther threatsAffected
  • <2.13
Fixed in
  • 2.13

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

Community reviews

Loading reviews…