CVE-2026-44788: SharpCompress path traversal in WriteToDirectory

CVE-2026-44788 · Severity: medium · CVSS 5.9 · Published 2026-05-26

SharpCompress, a popular .NET library for handling various archive formats, is vulnerable to a 'Zip Slip' style directory traversal. An attacker can provide a specially crafted ZIP or TAR archive that, when extracted, creates directories or files outside of the intended folder. This could allow an attacker to overwrite sensitive system files or configuration, potentially leading to unauthorized access or system disruption.

Technologies: SharpCompress (NuGet). Vendors: NuGet.

Quick answers

Is CVE-2026-44788 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-44788 being exploited in the wild.
How severe is CVE-2026-44788?
Medium severity, with a CVSS score of 5.9, published 26 May 2026.
Which products and versions are affected?
Adam Hathcock SharpCompress <= 0.47.4; SharpCompress (NuGet) ECOSYSTEM:introduced=0,fixed=0.48.0.
Is there a fix for CVE-2026-44788?
Yes. SharpCompress (NuGet): upgrade to 0.48.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-44788 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-44788?
Check whether you run Adam Hathcock SharpCompress or 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.48.0 or later
    dotnet add package SharpCompress --version 0.48.0

Technical details

A path traversal vulnerability exists in the `IArchive.WriteToDirectory()` method of SharpCompress. The root cause is a lack of path normalization (via `Path.GetFullPath`) and bounds checking in the directory-entry branch of the extraction logic, which uses `Path.Combine` insecurely. For ZIP archives, this allows arbitrary directory creation. For TAR archives, the vulnerability can be escalated to a full arbitrary file write primitive if the caller implements a `SymbolicLinkHandler`. This occurs because the library does not validate symlink targets, allowing an attacker to create a symlink pointing outside the extraction root and subsequently write a file through that symlink. The issue is fixed in version 0.48.0.

Affected products

  • adamhathcock SharpCompress < 0.48.0

Identifiers

  • CVE-2026-44788
  • GHSA-6c8g-7p36-r338

Timeline

  • 2026-05-06: disclosed
  • 2026-05-06: patched
  • 2026-05-08: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.