Cloudanix VulnDB

CVE-2023-7216

Medium · 5.3

CVSS

5.3

EPSS

0.9%

Published

Feb 5, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a common file-extraction tool can let attackers secretly place or replace files anywhere on a computer when someone opens a specially made archive file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Data Tampering
Component
Application
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The path traversal flaw in cpio allows extraction of specially crafted archives to follow symbolic links, writing files to arbitrary directories outside the intended extraction root.

Why it matters to the business

Attackers can overwrite or place files in sensitive system locations, leading to integrity violations, potential privilege escalation, or persistence on affected systems that process untrusted archives with cpio.

How an attack unfolds

An attacker creates a malicious archive containing symbolic links pointing outside the target directory, then tricks a user or automated process into extracting it with cpio; during extraction the tool follows the links and writes attacker-controlled content to arbitrary locations. Public exploit code is available though real-world adoption remains low.

How to fix it

Replace vulnerable cpio installations with the latest patched releases from GNU or Red Hat; where updates are unavailable, avoid extracting untrusted archives and prefer alternative archive tools with stricter symlink handling.

How to confirm the fix worked

Confirm cpio version against vendor advisories, test extraction of a benign symlink-containing archive in an isolated directory, and verify that files remain confined to the target path.

Typical attack path

  1. Craft archive with symlinks targeting sensitive paths
  2. Deliver archive via email, download, or shared storage
  3. Victim or script invokes cpio to extract the archive
  4. Cpio follows symlinks and writes files outside intended directory
  5. Attacker content persists or overwrites critical files

How to detect it

Review process execution logs for cpio invocations on unexpected archives, inspect file-creation timestamps around extraction events, and search system logs for writes outside normal extraction directories.

What your security team should do

  • Block or sandbox cpio extraction of archives from untrusted sources
  • Deploy updated cpio packages across all affected GNU and Red Hat systems
  • Audit scripts and workflows that invoke cpio for untrusted input handling
  • Monitor file-system changes during archive extraction for unexpected writes

The record

A path traversal vulnerability was found in the CPIO utility. This issue could allow a remote unauthenticated attacker to trick a user into opening a specially crafted archive. During the extraction process, the archiver could follow symlinks outside of the intended directory, which allows files to be written in arbitrary directories through symlinks.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:18.04:LTS cpio 0 No fix
Ubuntu:20.04:LTS cpio 0 No fix
Ubuntu:22.04:LTS cpio 0 No fix
Ubuntu:24.04:LTS cpio 0 No fix
Ubuntu:24.10 cpio 0 No fix
Ubuntu:25.04 cpio 0 No fix
Ubuntu:25.10 cpio 0 No fix
Ubuntu:Pro:14.04:LTS cpio 0 No fix
Ubuntu:Pro:16.04:LTS cpio 0 No fix
Ubuntu:Pro:18.04:LTS cpio 0 No fix
Ubuntu:Pro:20.04:LTS cpio 0 No fix

Related vulnerabilities