Cloudanix VulnDB

CVE-2023-7207

Medium · 4.9

CVSS

4.9

EPSS

0.9%

Published

Feb 29, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A common tool used to pack and unpack files on Linux systems has a flaw that could let someone put files in the wrong places during unpacking.

Exploitation
Remote Authenticated
Attacker needs
High Privilege
Complexity
Low
Impact
Data Exposure
Component
Application
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Path traversal flaw in cpio allows crafted archives to write files outside the intended extraction directory when the --no-absolute-filenames option is used, due to an incomplete revert of prior patches.

Why it matters to the business

Systems relying on cpio for archive extraction face risk of unauthorized file placement or overwrite, potentially disrupting operations or enabling follow-on compromise; low exploit likelihood but affects core packaging tools across Linux distributions.

How an attack unfolds

An attacker creates a malicious archive containing directory traversal sequences in file paths, then tricks a target into extracting it using cpio with the --no-absolute-filenames flag, resulting in files being written to arbitrary filesystem locations.

How to fix it

Upgrade cpio to the fixed commit 376d663340a9dc91c91a5849e5713f07571c1628 or later; rebuild and redistribute packages containing cpio; audit and update any scripts or automation that invoke cpio extraction.

How to confirm the fix worked

Confirm cpio binary reports a version containing commit 376d663340a9dc91c91a5849e5713f07571c1628; test extraction of a crafted archive containing traversal paths to verify files remain confined to the target directory.

Typical attack path

  1. Craft archive with relative paths containing ../ sequences
  2. Deliver archive to target via download, email, or package repository
  3. Induce extraction via cpio --no-absolute-filenames or equivalent script
  4. Files are written outside target directory, enabling further actions such as config modification or binary replacement

How to detect it

Search system logs and process execution records for cpio invocations that include --no-absolute-filenames combined with archive sources from untrusted locations; monitor for unexpected file creation timestamps or paths outside expected extraction roots after archive operations.

What your security team should do

  • Prioritize patching cpio in build pipelines and container images within 30 days given the long publication window
  • Review and restrict use of --no-absolute-filenames in automated extraction workflows
  • Add cpio version checks to software bill of materials and dependency scanners

The record

Debian's cpio contains a path traversal vulnerability. This issue was introduced by reverting CVE-2015-1197 patches which had caused a regression in --no-absolute-filenames. Upstream has since provided a proper fix to --no-absolute-filenames.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 cpio 0 No fix
Debian:12 cpio 0 No fix
Debian:13 cpio 0 2.14+dfsg-1
Debian:14 cpio 0 2.14+dfsg-1
SUSE:Enterprise Storage 7.1 cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise Micro 5.1 cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise Micro 5.2 cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise Micro 5.3 cpio 0 2.13-150400.3.3.1
SUSE:Linux Enterprise Micro 5.3 cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise Micro 5.4 cpio 0 2.13-150400.3.3.1
SUSE:Linux Enterprise Micro 5.4 cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise Micro 5.5 cpio 0 2.13-150400.3.3.1
SUSE:Linux Enterprise Micro 5.5 cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 cpio 0 2.13-150400.3.3.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise Server 12 SP5 cpio 0 2.11-36.18.1
SUSE:Linux Enterprise Server 12 SP5 cpio 0 2.11-36.21.1
SUSE:Linux Enterprise Server 15 SP2-LTSS cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise Server 15 SP3-LTSS cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise Server 15 SP4-LTSS cpio 0 2.13-150400.3.6.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 cpio 0 2.11-36.18.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 cpio 0 2.11-36.21.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 cpio 0 2.12-150000.3.12.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 cpio 0 2.13-150400.3.6.1
SUSE:Manager Proxy 4.3 cpio 0 2.13-150400.3.6.1
SUSE:Manager Server 4.3 cpio 0 2.13-150400.3.6.1
Ubuntu:20.04:LTS cpio 0 2.13+dfsg-2ubuntu0.4
Ubuntu:22.04:LTS cpio 0 2.13+dfsg-7ubuntu0.1
Ubuntu:23.10 cpio 0 2.13+dfsg-7.1ubuntu0.1
Ubuntu:24.04:LTS cpio 0 2.15+dfsg-1ubuntu1
openSUSE:Leap 15.5 cpio 0 2.13-150400.3.3.1
openSUSE:Leap 15.5 cpio 0 2.13-150400.3.6.1
openSUSE:Leap Micro 5.3 cpio 0 2.13-150400.3.3.1
openSUSE:Leap Micro 5.3 cpio 0 2.13-150400.3.6.1
openSUSE:Leap Micro 5.4 cpio 0 2.13-150400.3.3.1
openSUSE:Leap Micro 5.4 cpio 0 2.13-150400.3.6.1
openSUSE:Tumbleweed cpio 0 2.15-1.1

Related vulnerabilities