Skip to content

← Public intelligence

NuGet package

sharpcompress

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.9NuGetPublished

    SharpCompress has directory traversal via directory entries in WriteToDirectory (zip slip variant)

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

    Affected
    • NuGet sharpcompress < 0.48.0
    Fixed in
    0.48.0· Vendor fix available
    Issue
    A path traversal vulnerability in IArchive.WriteToDirectory() allows a malicious archive to create directories outside the intended extraction root. For TAR archives, this can be escalated to arbitrary file writes by chaining with a symlink entry, giving a full write primitive on the target filesystem subject to the permissions of the running process. Details The vulnerable code is in the directory-entry branch of WriteToDirectoryInternal (sync, IArchiveExtensions.cs:48–61) and WriteToDirectoryAsyncInternal (async, IAsyncArchiveExtensions.cs:70–84): No Path.GetFullPath() normalisation and no bounds check are applied before the Directory.CreateDirectory call. Two .NET Path.Combine behaviours make this exploitable: - Relative traversal: Path.Combine("/safe/extract", "../../evil") → the OS resolves .. segments on the raw path, placing the directory outside the extraction root. - Absolute path override: Path.Combine("/safe/extract", "/tmp/evil") → returns "/tmp/evil" — the base…

    Recommended action: Upgrade to 0.48.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 5.3NuGetPublished

    Partial path traversal in sharpcompress

    CVE-2021-39208 · GHSA-jp7f-grcv-6mjf

    Affected
    • NuGet sharpcompress < 0.29
    Fixed in
    0.29· Vendor fix available
    Issue
    SharpCompress recreates a hierarchy of directories under destinationDirectory if ExtractFullPath is set to true in options. In order to prevent extraction outside the destination directory the destinationFileName path is verified to begin with fullDestinationDirectoryPath. However it is not enforced that fullDestinationDirectoryPath ends with slash: If the destinationDirectory is not slash terminated like /home/user/dir it is possible to create a file with a name thats begins as the destination directory one level up from the directory, i.e. /home/user/dir.sh. Impact Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case.

    Recommended action: Upgrade to 0.29 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. Medium, CVSS 5.5NuGetPublished

    Directory Traversal in SharpCompress

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

    Affected
    • NuGet sharpcompress < 0.21.0
    Fixed in
    0.21.0· Vendor fix available
    Issue
    SharpCompress prior to version 0.21 is vulnerable to path traversal issue in archive extraction.

    Recommended action: Upgrade to 0.21.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →