Vulnerability Details : CVE-2021-38185
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.
Vulnerability category: OverflowExecute code
Exploit prediction scoring system (EPSS) score for CVE-2021-38185
Probability of exploitation activity in the next 30 days: 0.22%
Percentile, the proportion of vulnerabilities that are scored at or less: ~ 59 % EPSS Score History EPSS FAQ
CVSS scores for CVE-2021-38185
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source |
---|---|---|---|---|---|
6.8
|
MEDIUM | AV:N/AC:M/Au:N/C:P/I:P/A:P |
8.6
|
6.4
|
NIST |
7.8
|
HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
1.8
|
5.9
|
NIST |
CWE ids for CVE-2021-38185
-
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.Assigned by: nvd@nist.gov (Primary)
References for CVE-2021-38185
-
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.html
Re: cpio RCE Exploit Caused by Integer OverflowExploit;Mailing List;Vendor Advisory
-
https://lists.debian.org/debian-lts-announce/2023/06/msg00007.html
[SECURITY] [DLA 3445-1] cpio security update
-
https://github.com/fangqyi/cpiopwn
GitHub - fangqyi/cpiopwn: ACE poc exploit for glibc cpio 2.13 through mmap chunk metadata curruption (CVE-2021-38185)Exploit;Third Party Advisory
-
https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.html
cpio RCE Exploit Caused by Integer OverflowExploit;Mailing List;Vendor Advisory
-
https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061b
cpio.git - GNU cpioPatch;Third Party Advisory
Products affected by CVE-2021-38185
- cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*