# CVE-2023-37460: Plexus Archiver vulnerable to Arbitrary File Creation in AbstractUnArchiver

> Attackers can create arbitrary files and potentially execute code by exploiting symlink handling during archive extraction in Plexus Archiver.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Jul 2023
- **Updated:** 3 Oct 2024
- **Also known as:** AZL-27645, AZL-34813, GHSA-wh3p-fphp-9h2m, OESA-2025-1670, OESA-2025-1671, OESA-2025-1859, OESA-2025-1860, OESA-2025-1861, OESA-2025-1862, RHSA-2023:6886, SUSE-RU-2024:0560-1, UBUNTU-CVE-2023-37460, openSUSE-SU-2024:13309-1

## What is CVE-2023-37460?

CVE-2023-37460 is a high-severity path traversal vulnerability in codehaus-plexus plexus-archiver, published on 25 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Plexis Archiver is a collection of Plexus components to create archives or extract archives to a directory with a unified `Archiver`/`UnArchiver` API. Prior to version 4.8.0, using AbstractUnArchiver for extracting an archive might lead to an arbitrary file creation and possibly remote code execution. When extracting an archive with an entry that already exists in the destination directory as a symbolic link whose target does not exist - the `resolveFile()` function will return the symlink's source instead of its target, which will pass the verification that ensures the file will not be extracted outside of the destination directory. Later `Files.newOutputStream()`, that follows symlinks by default,  will actually write the entry's content to the symlink's target. Whoever uses plexus archiver to extract an untrusted archive is vulnerable to an arbitrary file creation and possibly remote code execution. Version 4.8.0 contains a patch for this issue.

Weakness: CWE-61 (UNIX Symbolic Link (Symlink) Following), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

2 open source packages ship an affected version, including org.codehaus.plexus:plexus-archiver. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.codehaus.plexus:plexus-archiver` | Maven | All versions | 4.8.0 |
| `org.codehaus.plexus:plexus-archiver` | Maven | All versions | 4.8.0 |
| `plexus-archiver` | Red Hat:enterprise_linux:7::client | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver-javadoc` | Red Hat:enterprise_linux:7::client | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver-javadoc` | Red Hat:enterprise_linux:7::computenode | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver` | Red Hat:enterprise_linux:7::server | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver-javadoc` | Red Hat:enterprise_linux:7::server | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver` | Red Hat:enterprise_linux:7::workstation | All versions | 0:2.4.2-6.el7_9 |
| `plexus-archiver-javadoc` | Red Hat:enterprise_linux:7::workstation | All versions | 0:2.4.2-6.el7_9 |
| `maven-archiver` | SUSE:Enterprise Storage 7.1 | All versions | 3.6.1-150200.3.7.3 |
| `maven-common-artifact-filters` | SUSE:Enterprise Storage 7.1 | All versions | 3.3.2-150200.3.7.3 |
| `maven-compiler-plugin` | SUSE:Enterprise Storage 7.1 | All versions | 3.11.0-150200.3.7.1 |
| `maven-plugin-tools` | SUSE:Enterprise Storage 7.1 | All versions | 3.9.0-150200.3.7.3 |
| `objectweb-asm` | SUSE:Enterprise Storage 7.1 | All versions | 9.6-150200.3.11.3 |
| `plexus-archiver` | SUSE:Enterprise Storage 7.1 | All versions | 4.8.0-150200.3.7.2 |
| `plexus-compiler` | SUSE:Enterprise Storage 7.1 | All versions | 2.14.2-150200.3.9.2 |
| `maven-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.6.1-150200.3.7.3 |
| `maven-common-artifact-filters` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.3.2-150200.3.7.3 |
| `maven-compiler-plugin` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.11.0-150200.3.7.1 |
| `maven-plugin-tools` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.9.0-150200.3.7.3 |
| `objectweb-asm` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 9.6-150200.3.11.3 |
| `plexus-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 4.8.0-150200.3.7.2 |
| `plexus-compiler` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.14.2-150200.3.9.2 |
| `maven-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 3.6.1-150200.3.7.3 |
| `maven-common-artifact-filters` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 3.3.2-150200.3.7.3 |
| `maven-compiler-plugin` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 3.11.0-150200.3.7.1 |
| `maven-plugin-tools` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 3.9.0-150200.3.7.3 |
| `objectweb-asm` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 9.6-150200.3.11.3 |
| `plexus-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 4.8.0-150200.3.7.2 |
| `plexus-compiler` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 2.14.2-150200.3.9.2 |
| `maven-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 3.6.1-150200.3.7.3 |
| `maven-common-artifact-filters` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 3.3.2-150200.3.7.3 |
| `maven-compiler-plugin` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 3.11.0-150200.3.7.1 |
| `maven-plugin-tools` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 3.9.0-150200.3.7.3 |
| `objectweb-asm` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 9.6-150200.3.11.3 |
| `plexus-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 4.8.0-150200.3.7.2 |
| `plexus-compiler` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 2.14.2-150200.3.9.2 |
| `maven-archiver` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 3.6.1-150200.3.7.3 |
| `maven-common-artifact-filters` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 3.3.2-150200.3.7.3 |

Products: Codehaus-Plexus Plexus-Archiver.

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

Upgrade org.codehaus.plexus:plexus-archiver to 4.8.0 or later.

## Is CVE-2023-37460 being exploited?

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

Public exploit code:

- https://github.com/shoucheng3/codehaus-plexus__plexus-archiver_CVE-2023-37460_4-7-1 (github_poc): https://github.com/shoucheng3/codehaus-plexus__plexus-archiver_CVE-2023-37460_4-7-1

## Other vulnerabilities in codehaus-plexus plexus-archiver

- [CVE-2018-1002200](https://insights.sbomify.com/CVE-2018-1002200/): Improper Limitation of a Pathname to a Restricted Directory in plexus-archiver (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2023-37460 is a high-severity path traversal vulnerability in codehaus-plexus plexus-archiver, published on 25 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-37460 exists.

Affected packages and fixed versions:
- org.codehaus.plexus:plexus-archiver (Maven): affected all versions; fixed in 4.8.0
- org.codehaus.plexus:plexus-archiver (Maven): affected all versions; fixed in 4.8.0

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-37460/ (Markdown: https://insights.sbomify.com/CVE-2023-37460/index.md)
```

## Sources

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

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