CVE-2021-38185

Exp

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.

Published: 2021-08-07 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-38185 is rated High Exploit Risk (72.5/100): CVSS High severity, with medium exploitation likelihood (EPSS 4.15%). Core evidence: 3 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-38185

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-38185

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 26.33% 4.15% -22.18%
2 2026-05-11 26.71% 26.33% -0.37%
3 2025-11-21 26.71%

Full EPSS history (27 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-38185

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0
6.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 6.4 [email protected]

Weakness enumeration for CVE-2021-38185

OS Trackers for CVE-2021-38185

vendor priority summary link
alpine CVE-2021-38185: 1 source package rows (cpio); 14 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 10, open 4. https://security.alpinelinux.org/vuln/CVE-2021-38185
debian not yet assigned CVE-2021-38185 not yet assigned priority: Debian including 1 source packages (cpio), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-38185
gentoo normal CVE-2021-38185: 1 GLSA(s) (202407-07), 1 atom(s) (app-arch/cpio); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-38185
redhat medium https://access.redhat.com/security/cve/CVE-2021-38185
suse high CVE-2021-38185 severity important: SUSE including 351 source package names (0.1.0:cpio-2.12-3.9.1, 0.1.75:cpio-2.12-3.9.1, …), 529 product×package rows across 217 product lines (Container bci/bci-init, Container bci/dotnet-aspnet, … (217 product lines)): Fixed 387, Known Affected 142. https://www.suse.com/security/cve/CVE-2021-38185/
ubuntu medium CVE-2021-38185 medium priority: Ubuntu including 1 source packages (cpio), 10 status rows across 10 suites (bionic, focal, hirsute, impish, jammy, kinetic, lunar, trusty, upstream, xenial): released 10. https://ubuntu.com/security/CVE-2021-38185

Affected software / configurations for CVE-2021-38185

Vendor Product Version Raw CPE
gnu cpio <= 2.13 cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*

References for CVE-2021-38185

cvelogic Threat Intelligence