# CVE-2018-1002206: SharpCompress directory traversal in archive extraction

Source: https://junglewise.ai/threats/cve-2018-1002206-sharpcompress-directory-traversal-in-archive-extraction  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-09-11. Updated: 2026-06-09  
License: CC BY 4.0 with a link back

CVE-2018-1002206 · Severity: medium · CVSS 5.5 · Published 2019-09-11

SharpCompress is a popular library used by developers to handle compressed files like ZIP and RAR archives. A security flaw in versions before 0.21.0 allows a malicious archive to write files to unintended locations on a computer when it is extracted. This could allow an attacker to overwrite critical system files or application data, potentially compromising the integrity of the system.

Technologies: [SharpCompress (NuGet)](https://junglewise.ai/threats/technologies/nuget-sharpcompress). Vendors: [NuGet](https://junglewise.ai/threats/vendors/nuget).

## Quick answers

**Is CVE-2018-1002206 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2018-1002206 being exploited in the wild.

**How severe is CVE-2018-1002206?** Medium severity, with a CVSS score of 5.5, published 11 September 2019.

**Which products and versions are affected?** SharpCompress (NuGet) ECOSYSTEM:introduced=0,fixed=0.21.0.

**Is there a fix for CVE-2018-1002206?** Yes. SharpCompress (NuGet): upgrade to 0.21.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2018-1002206 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2018-1002206?** Check whether you run SharpCompress (NuGet) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- SharpCompress (NuGet): upgrade to 0.21.0 or later

  ```sh
  dotnet add package SharpCompress --version 0.21.0
  ```


## Technical details

SharpCompress prior to version 0.21.0 is vulnerable to a directory traversal attack, commonly known as 'Zip Slip'. The vulnerability exists because the library does not properly validate or neutralize file paths contained within an archive during the extraction process. An attacker can craft a malicious archive containing filenames with traversal sequences (e.g., '../../') to write files outside of the intended target directory. This local attack requires a user to extract a malicious archive using the vulnerable library. Successful exploitation can lead to arbitrary file overwrite on the host system. The issue is fixed in version 0.21.0.

## Affected products

- SharpCompress SharpCompress < 0.21.0

## Identifiers

- CVE-2018-1002206
- GHSA-fxh6-w476-hgr4

## Timeline

- 2018-07-25: advisory: NVD published CVE-2018-1002206
- 2019-09-11: disclosed: GitHub Advisory published

## References

- [https://api.github.com/users/geoffodonnell](https://api.github.com/users/geoffodonnell)
- [https://github.com/geoffodonnell](https://github.com/geoffodonnell)
- [https://api.github.com/users/geoffodonnell/gists%7B/gist_id%7D](https://api.github.com/users/geoffodonnell/gists%7B/gist_id%7D)
- [https://api.github.com/users/geoffodonnell/repos](https://api.github.com/users/geoffodonnell/repos)
- [https://avatars.githubusercontent.com/u/89282445?v=4](https://avatars.githubusercontent.com/u/89282445?v=4)
- [https://api.github.com/users/geoffodonnell/events%7B/privacy%7D](https://api.github.com/users/geoffodonnell/events%7B/privacy%7D)

## Related threats

- [SharpCompress path traversal in WriteToDirectory](https://junglewise.ai/threats/cve-2026-44788-sharpcompress-path-traversal-in-writetodirectory)
- [Partial path traversal in sharpcompress](https://junglewise.ai/threats/cve-2021-39208-partial-path-traversal-in-sharpcompress)
