# CVE-2023-7207: Path traversal in Debian cpio

> A path traversal vulnerability in Debian's cpio allows attackers to read or modify files outside the intended directory.

- **Severity:** Medium 4.9 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jan 2024
- **Updated:** 7 May 2025
- **Also known as:** DEBIAN-CVE-2023-7207, GHSA-x4gq-xcr8-xwp7, SUSE-SU-2024:0238-1, SUSE-SU-2024:0248-1, SUSE-SU-2024:0305-1, SUSE-SU-2024:0305-2, SUSE-SU-2024:0305-3, SUSE-SU-2024:0824-1, SUSE-SU-2024:0825-1, UBUNTU-CVE-2023-7207, USN-6755-1, openSUSE-SU-2024:13653-1

## What is CVE-2023-7207?

CVE-2023-7207 is a medium-severity path traversal vulnerability in Debian cpio, published on 5 Jan 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2023-7207?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cpio` | SUSE:Enterprise Storage 7.1 | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.1 | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.2 | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.3 | All versions | 2.13-150400.3.3.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.3 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.4 | All versions | 2.13-150400.3.3.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.4 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.5 | All versions | 2.13-150400.3.3.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.5 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Micro 5.5 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 2.13-150400.3.3.1 |
| `cpio` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.11-36.18.1 |
| `cpio` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.11-36.21.1 |
| `cpio` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.11-36.18.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.11-36.21.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 2.12-150000.3.12.1 |
| `cpio` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Manager Proxy 4.3 | All versions | 2.13-150400.3.6.1 |
| `cpio` | SUSE:Manager Server 4.3 | All versions | 2.13-150400.3.6.1 |
| `cpio` | openSUSE:Leap 15.5 | All versions | 2.13-150400.3.3.1 |
| `cpio` | openSUSE:Leap 15.5 | All versions | 2.13-150400.3.6.1 |
| `cpio` | openSUSE:Leap Micro 5.3 | All versions | 2.13-150400.3.3.1 |
| `cpio` | openSUSE:Leap Micro 5.3 | All versions | 2.13-150400.3.6.1 |
| `cpio` | openSUSE:Leap Micro 5.4 | All versions | 2.13-150400.3.3.1 |
| `cpio` | openSUSE:Leap Micro 5.4 | All versions | 2.13-150400.3.6.1 |
| `cpio` | openSUSE:Tumbleweed | All versions | 2.15-1.1 |

Products: Gnu Cpio.

## How do I fix CVE-2023-7207?

Apply the vendor's patch.

## Is CVE-2023-7207 being exploited?

There is no known exploitation of CVE-2023-7207 in the wild and no public exploit code.

## Other vulnerabilities in Debian cpio

- [CVE-2021-38185](https://insights.sbomify.com/CVE-2021-38185/): Integer overflow in n/a (high 7.8)
- [CVE-2010-4226](https://insights.sbomify.com/CVE-2010-4226/): Path traversal in n/a (high 7.2)
- [CVE-2010-0624](https://insights.sbomify.com/CVE-2010-0624/): Memory corruption in n/a (medium 6.8)
- [CVE-2019-14866](https://insights.sbomify.com/CVE-2019-14866/): Path traversal in cpio (medium 6.7)
- [CVE-2023-7216](https://insights.sbomify.com/CVE-2023-7216/): Cpio: extraction allows symlinks which enables remote command execution (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-7207 and fix it if it is affected.

What it is: CVE-2023-7207 is a medium-severity path traversal vulnerability in Debian cpio, published on 5 Jan 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-7207 in the wild and no public exploit code.

Affected product: Debian cpio. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-7207/ (Markdown: https://insights.sbomify.com/CVE-2023-7207/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-7207
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-7207
- OSV: https://osv.dev/vulnerability/CVE-2023-7207

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-7207/
Summaries are generated and may contain mistakes; the official description above is the record.
