CVE-2023-7216 Cpio: extraction allows symlinks which enables remote command execution

Medium 5.3 Published Updated

A path traversal flaw in Cpio allows attackers to write files to arbitrary directories via symlinks, potentially leading to remote code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2023-7216?

CVE-2023-7216 is a medium-severity path traversal vulnerability in Redhat Enterprise Linux, published on 5 Feb 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-22, CWE-59

Which versions are affected by CVE-2023-7216?

It affects 2 products.

Products include Gnu Cpio, Redhat Enterprise Linux.

How do I fix CVE-2023-7216?

No fix has been published for CVE-2023-7216 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2023-7216 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-7216 exists.

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as GHSA-v9vx-4mxw-76j2, UBUNTU-CVE-2023-7216.

Is CVE-2023-7216 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free