SecurityContext

CVE-2021-38185: GNU cpio - Integer Overflow

  • Cve: CVE-2021-38185
  • Name: GNU cpio - Integer Overflow
  • 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.
  • Impact: Attackers can execute arbitrary code on the affected system, leading to full system compromise.
  • Remediation: Update to the latest version of GNU cpio that addresses this vulnerability.
  • Vulnerability type: integer_overflow
  • Vulnerability impact: remote_code_execution
  • Requirement type: user_interaction
  • Requirements: Attacker needs to provide a crafted pattern file with untrusted data
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.8
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Epss score: 0.04165
  • Epss percentile: 0.91047
  • Assignee: [email protected]
  • Published at: 2021-08-08T00:15:07Z
  • Age in days: 1934
  • Modified at: 2026-06-17T04:01:42Z
  • Patch available: yes
  • Public exploits total: 3
  • References total: 5
  • Products total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-38185
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-190Integer Overflow or Wraparound

Public exploits

Same in every row:

  • Source: nvd
  • Added date: 2021-08-08
Url
https://github.com/fangqyi/cpiopwn
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html

References

Same in every row:

  • Source: nvd
UrlTags
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061bPatch, Third Party Advisory
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.htmlExploit, Mailing List, Vendor Advisory
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.htmlExploit, Mailing List, Vendor Advisory
https://github.com/fangqyi/cpiopwnExploit, Third Party Advisory
https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html

Products

ProductAffectedPlatform boundSourcesUrl
gnu:cpio<= 2.13nonvd/v1/products/gnu/cpio

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 3
  • Public exploit first date: 2021-08-08
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts