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
Products affected by CVE-2021-38185
- cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-38185
0.20%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 57 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-38185
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
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 occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.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
Jump to