CVE-2021-38185

cpio: integer overflow in ds_fgetstr() in dstring.c can lead to an out-of-bounds write via a crafted pattern file

Published Aug 7, 2021 CVSS 3.1 · 7.8 High EPSS 4.2% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3445-1 cpio security update
Ubuntu USN Ubuntu USN USN-5064-1 GNU cpio vulnerability
Ubuntu USN Ubuntu USN USN-5064-2 GNU cpio vulnerability
Ubuntu USN Ubuntu USN USN-5064-3 GNU cpio vulnerability
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Jun 9, 2025, 3:11 PM
Reserved
Aug 7, 2021, 12:00 AM
Status
Modified
Published
Aug 8, 2021, 12:15 AM
Modified
Jun 17, 2026, 4:01 AM
Severity
Moderate
Public date
Aug 6, 2021, 12:00 AM