Uncontrolled Memory Allocation Affecting cpio package, versions <2.15+dfsg-1ubuntu2.1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.19% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU2404-CPIO-18741453
  • published18 Aug 2026
  • disclosed10 Aug 2026

Introduced: 10 Aug 2026

CVE-2026-66485  (opens in a new tab)
CWE-789  (opens in a new tab)

How to fix?

Upgrade Ubuntu:24.04 cpio to version 2.15+dfsg-1ubuntu2.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream cpio package and not the cpio package as distributed by Ubuntu. See How to fix? for Ubuntu:24.04 relevant fixed versions and status.

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

CVSS Base Scores

version 3.1