Vulnerability · Published Aug 7, 2021 · Assigned by mitre

CVE-2021-38185

High 7.8

In plain English

A high-severity integer overflow in the cpio package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.2% (higher than 91% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)4.2%top 9.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8cpio2.12-11.el8ALSA-2022:1991
Alpine:v3.20cpio2.13-r2ALPINE-CVE-2021-38185
Alpine:v3.21cpio2.13-r2ALPINE-CVE-2021-38185
Alpine:v3.22cpio2.13-r2ALPINE-CVE-2021-38185
Alpine:v3.23cpio2.13-r2ALPINE-CVE-2021-38185
Alpine:v3.24cpio2.13-r2ALPINE-CVE-2021-38185
Debian:12cpio2.13+dfsg-5DEBIAN-CVE-2021-38185
Debian:13cpio2.13+dfsg-5DEBIAN-CVE-2021-38185
Debian:14cpio2.13+dfsg-5DEBIAN-CVE-2021-38185
Rocky Linux:8cpio0:2.12-11.el8RLSA-2022:1991
Ubuntu:22.04:LTScpio2.13+dfsg-4ubuntu4UBUNTU-CVE-2021-38185

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-190 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References