CVE-2023-7216
Medium · 5.3CVSS
5.3
EPSS
0.9%
Published
Feb 5, 2024
CISA due date
—
Cloudanix analysis
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.
- 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
- Craft archive with symlinks targeting sensitive paths
- Deliver archive via email, download, or shared storage
- Victim or script invokes cpio to extract the archive
- Cpio follows symlinks and writes files outside intended directory
- 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
- CVE-2023-7207 Debian's cpio contains a path traversal vulnerability. Also affects cpio
- CVE-2026-113724 virtualenv is a tool for creating isolated virtual python environments. CWE-59
- CVE-2026-113716 virtualenv is a tool for creating isolated virtual python environments. CWE-59
- CVE-2026-55480 OpenPrinting CUPS is an open source printing system for Linux and other Unix-like… CWE-59
- CVE-2026-90954 A flaw was found in BusyBox's dpkg-deb archive extraction. CWE-59
- CVE-2026-109274 ImageMagick before 7.1.2-32 contains a time-of-check time-of-use symlink race… CWE-59
- CVE-2026-105081 ImageMagick before 6.9.13-58 and 7.x before 7.1.2-33 does not properly account for… CWE-59
- CVE-2026-108119 A flaw was found in busybox. CWE-59