cve.bz

CVE-2021-38185 gnu cpio: Year 2038 problem, Y2K38, Y2038, Epochalypse

7.8 highExploit referenceEPSS 4.2%Fix available

High (7.8) in gnu cpio. EPSS 4.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
4.2% (unchanged from 4.2% a week ago; 4.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 91st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-06-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-190 Integer Overflow or Wraparound (Year 2038 problem, Y2K38, Y2038, Epochalypse)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-38185 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-38185?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-38185?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-38185 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gnu:cpiothrough 2.13

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10cpio2.12+dfsg-9+deb10u1DLA-3445-1
Debian12, 13, 14cpio2.13+dfsg-5DEBIAN-CVE-2021-38185
Ubuntu18.04:LTScpio2.12+dfsg-6ubuntu0.18.04.4UBUNTU-CVE-2021-38185 USN-5064-1
Ubuntu20.04:LTScpio2.13+dfsg-2ubuntu0.3UBUNTU-CVE-2021-38185 USN-5064-1
Ubuntu22.04:LTScpio2.13+dfsg-4ubuntu4UBUNTU-CVE-2021-38185
UbuntuPro:14.04:LTScpio2.11+dfsg-1ubuntu1.2+esm2UBUNTU-CVE-2021-38185 USN-5064-3
UbuntuPro:16.04:LTScpio2.11+dfsg-5ubuntu1.1+esm1UBUNTU-CVE-2021-38185 USN-5064-2
Red Hatenterprise_linux:8::baseoscpio, cpio-debuginfo, cpio-debugsource0:2.12-11.el8RHSA-2022:1991
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 13 morecpio2.12-3.9.1SUSE-RU-2021:2780-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 10 morecpio2.11-36.12.1SUSE-RU-2021:2779-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 10 morecpio2.11-36.15.1SUSE-SU-2021:2808-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 10 morecpio2.11-36.9.1SUSE-SU-2021:2686-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP4-LTSScpio2.9-75.81.14.1SUSE-SU-2021:14788-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP4-LTSScpio2.9-75.81.8.1SUSE-SU-2021:14777-1
openSUSETumbleweedcpio2.13-3.3openSUSE-SU-2024:10697-1
AlmaLinux8cpio2.12-11.el8ALSA-2022:1991
Rocky Linux8cpio0:2.12-11.el8RLSA-2022:1991
Alpinev3.14, v3.15, v3.16 and 8 morecpio2.13-r2ALPINE-CVE-2021-38185
Azure Linux2cpio2.13-4AZL-6357

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

cpio on Red Hat Enterprise Linux 8 is compiled with full RELRO, which mitigates the exploitation technique demonstrated in the report. Additionally, this requires the use of an unusual set of parameters.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8cpio-0:2.12-11.el8Fixed 2022-05-10RHSA-2022:1991
Red Hat Enterprise Linux 6cpioOut of support scope
Red Hat Enterprise Linux 7cpioOut of support scope
Red Hat Enterprise Linux 9cpioNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-38185.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON