CVE-2026-66486

Improper Output Encoding in GNU cpio

Published Aug 10, 2026 CVSS 4.0 · 4.6 Medium EPSS < 1% KEV · Not listed
Description
GNU cpio is vulnerable to improper encoding or escaping of output in its archive member listing functionality. When listing archive members via cpio -it, member names are printed directly to output without quoting or escaping. An attacker can craft a cpio archive containing member names with embedded newline characters or ANSI escape sequences, causing forged listing entries or terminal control sequence injection when the listing is displayed.




This issue has been fixed in commit 2ff9600c9ef32e88759843cdbde74c8db5ae9b30

Analysis

AI-generated

Technical impact

GNU cpio’s archive listing command outputs member names without adequate escaping, allowing a malicious archive to embed newline or ANSI escape sequences in file names. When a user runs cpio -it, those unfiltered characters appear directly on the terminal, potentially producing forged entries or triggering terminal control sequences. The impact is restricted to the display output, enabling confusion or social‑engineering attacks but not code execution or system compromise. The weakness is classified as CWE-116 and CWE-94.

Affected Systems

The issue affects GNU cpio installations that have not incorporated commit 2ff9600c9ef32e88759843cdbde74c8db5ae9b30; all releases distributed prior to that fix are vulnerable. The CNA product list includes only GNU:cpio, which applies to the core GNU cpio binaries and associated packages on Linux and Unix‑like systems. No specific version numbers were enumerated, so any cpio binary lacking the commit is considered at risk.

Risk and Exploitability

The calculated CVSS score of 4.6 indicates a moderate risk level, while the EPSS score of <1% signals a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog, suggesting no widely reported or active exploitation. Because the flaw is local and requires an attacker to run cpio on a crafted archive, the attack vector is typically an insider or a compromised user with shell access. Even though the risk is low, the impact on terminal display could be used for deceptive or disruptive purposes in sensitive environments.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GNU cpio to a version that includes commit 2ff9600c9ef32e88759843cdbde74c8db5ae9b30, which properly escapes archive member names when listing.
  • If upgrading cannot be performed immediately, redirect the output of cpio -it to a file and post‑process it to strip or escape newline and ANSI escape characters, or use a wrapper script that sanitizes the archive before listing.
  • As an additional precaution, configure terminal emulators to disable or filter ANSI escape sequences, or employ dedicated escape‑filter utilities to ensure that any unintended terminal control commands are neutralized.

Generated by OpenCVE AI on August 13, 2026 at 09:46 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-94
References
Metrics threat_severity

None

cvssV3_1

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

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 improper encoding or escaping of output in its archive member listing functionality. When listing archive members via cpio -it, member names are printed directly to output without quoting or escaping. An attacker can craft a cpio archive containing member names with embedded newline characters or ANSI escape sequences, causing forged listing entries or terminal control sequence injection when the listing is displayed. This issue has been fixed in commit 2ff9600c9ef32e88759843cdbde74c8db5ae9b30
Title Improper Output Encoding in GNU cpio
First Time appeared Gnu
Gnu cpio
Weaknesses CWE-116
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:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
CERT-PL
Published
Updated
Aug 10, 2026, 10:35 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