# CVE-2019-10743: Path Traversal in MHolt Archiver

> Attackers can exploit path traversal in archiver's unarchive functions to overwrite files outside the target directory, potentially leading to arbitrary code execution.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`)
- **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 available:** Yes
- **Published:** 28 Oct 2019
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-h74j-692g-48mq

## What is CVE-2019-10743?

CVE-2019-10743 is a medium-severity path traversal vulnerability in archiver, published on 28 Oct 2019. 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

All versions of archiver allow attacker to perform a Zip Slip attack via the "unarchive" functions. It is exploited using a specially crafted zip archive, that holds path traversal filenames. When exploited, a filename in a malicious archive is concatenated to the target extraction directory, which results in the final path ending up outside of the target folder. For instance, a zip may hold a file with a "../../file.exe" location and thus break out of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

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

## Which versions are affected by CVE-2019-10743?

2 open source packages ship an affected version, including github.com/mholt/archiver. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/mholt/archiver` | Go | From 3.0.0 | 3.3.2 |
| `github.com/mholt/archiver` | Go | From 3.0.0 | 3.3.2 |

Products: Archiver Project Archiver.

## How do I fix CVE-2019-10743?

Upgrade github.com/mholt/archiver to 3.3.2 or later.

## Is CVE-2019-10743 being exploited?

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

Public exploit code:

- https://github.com/albisorua/PoC-CVE-2019-10743 (github_poc): https://github.com/albisorua/PoC-CVE-2019-10743

## Other vulnerabilities in archiver

- [CVE-2018-1002207](https://insights.sbomify.com/CVE-2018-1002207/): Arbitrary File Write via Archive Extraction in mholt/archiver (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-10743 and fix it if it is affected.

What it is: CVE-2019-10743 is a medium-severity path traversal vulnerability in archiver, published on 28 Oct 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-10743 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/mholt/archiver (Go): affected from 3.0.0; fixed in 3.3.2
- github.com/mholt/archiver (Go): affected from 3.0.0; fixed in 3.3.2

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

## Sources

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

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