CVE-2026-66485

Uncontrolled Memory Allocation in GNU cpio

Published Aug 10, 2026 CVSS 4.0 · 4.6 Medium EPSS < 1% KEV · Not listed
Description
GNU cpio is vulnerable to an uncontrolled memory allocation in the make_path function at src/makepath.c. The function uses alloca to allocate stack memory based on the length of argpath, which is derived from an archive-controlled pathname during extraction. A malicious cpio archive containing a sufficiently long nested pathname causes an unbounded stack allocation, resulting in a stack overflow and crash of the cpio process. An attacker who can supply a crafted cpio archive to a victim who extracts it can cause a denial of service.

This issue has been fixed in commit 3cd514031371d8aeeaf2048aa10103e02831aaa9

Analysis

AI-generated

Technical impact

GNU cpio contains an uncontrolled memory allocation flaw in its make_path function, where alloca allocates stack memory directly from the length of a pathname extracted from an archive. A malicious cpio file with a deeply nested pathname can trigger an unbounded stack allocation, causing a stack overflow and crashing the cpio process. This flaw (CWE‑789) results in a denial of service for the user running the extraction.

Affected Systems

All releases of GNU cpio prior to commit 3cd514031371d8aeeaf2048aa10103e02831aaa9 contain the flaw. The patch that resolves the issue is incorporated in newer releases of the project.

Risk and Exploitability

The CVSS score of 4.6 indicates a moderate risk, and the EPSS score of < 1% signals a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. Exploitation requires an attacker to supply a malicious cpio archive to a user or service that performs extraction. Successful execution results in a crash of the cpio process, thereby denying service to the current session.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GNU cpio to a release that includes commit 3cd514031371d8aeeaf2048aa10103e02831aaa9.
  • Rebuild or update any applications or packages that rely on the old cpio to link against the updated library.
  • As an interim measure, limit processing of untrusted archives by enforcing a maximum pathname length or disabling cpio extraction where feasible.

Generated by OpenCVE AI on August 13, 2026 at 09:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8704-1 GNU cpio vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-120
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.0, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description GNU cpio is vulnerable to an uncontrolled memory allocation in the make_path function at src/makepath.c. The function uses alloca to allocate stack memory based on the length of argpath, which is derived from an archive-controlled pathname during extraction. A malicious cpio archive containing a sufficiently long nested pathname causes an unbounded stack allocation, resulting in a stack overflow and crash of the cpio process. An attacker who can supply a crafted cpio archive to a victim who extracts it can cause a denial of service. This issue has been fixed in commit 3cd514031371d8aeeaf2048aa10103e02831aaa9
Title Uncontrolled Memory Allocation in GNU cpio
First Time appeared Gnu
Gnu cpio
Weaknesses CWE-789
CPEs cpe:2.3:a:gnu:cpio:*:*:*:*:*:*:*:*
Vendors & Products Gnu
Gnu cpio
References
Metrics cvssV4_0

{'score': 4.6, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
CERT-PL
Published
Updated
Aug 10, 2026, 10:56 AM
Reserved
Jul 27, 2026, 11:32 AM
Status
Deferred
Published
Aug 10, 2026, 11:17 AM
Modified
Oct 24, 2026, 4:10 PM
Severity
Moderate
Public date
Aug 10, 2026, 10:25 AM