CVE-2021-38185
JSON

7.8high

GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c dsfgetstr integer overf…

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
4.17% (higher than 91% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

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

Product or packageVersionsReported by
Unspecified productn/aCVE List
gnu cpioup to 2.13NVD

All scores

CISA-ADP7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

CWE-190

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

GNU cpio versiones hasta 2.13, permite a atacantes ejecutar código arbitrario por medio de un archivo de patrones diseñado, debido a un desbordamiento de enteros en el archivo dstring.c en la función ds_fgetstr que desencadena una escritura de pila fuera de límites. NOTA: no está claro si hay casos comunes en los que el archivo de patrones, asociado con la opción -E, son datos no confiables

References

Sources

SourceRecordLicence
CVE ListCVE-2021-38185 changed 2025-06-09CVE Terms of Use
NVDCVE-2021-38185 changed 2026-06-17Public domain