Search

Find a vulnerability

Search criteria

    9 vulnerabilities found for sharpcompress by sharpcompress_project

    FKIE_CVE-2026-44788

    Vulnerability from fkie_nvd - Published: 2026-05-26 22:16 - Updated: 2026-07-24 11:10
    Summary
    SharpCompress is a fully managed C# library to deal with many compression types and formats. In 0.47.4 and earlier, 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.
    Impacted products
    Vendor Product Version
    adamhathcock sharpcompress *

    {
      "affected": [
        {
          "affectedData": [
            {
              "product": "sharpcompress",
              "vendor": "adamhathcock",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c= 0.47.4"
                }
              ]
            }
          ],
          "source": "security-advisories@github.com"
        }
      ],
      "configurations": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:adamhathcock:sharpcompress:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "888E5454-3312-4A3D-A0AC-17813F917C83",
                  "versionEndIncluding": "0.47.4",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "cveTags": [],
      "descriptions": [
        {
          "lang": "en",
          "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. In 0.47.4 and earlier, 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."
        },
        {
          "lang": "es",
          "value": "SharpCompress es una biblioteca C# totalmente gestionada para manejar muchos tipos y formatos de compresi\u00f3n. En 0.47.4 y versiones anteriores, una vulnerabilidad de salto de ruta en IArchive.WriteToDirectory() permite que un archivo malicioso cree directorios fuera de la ra\u00edz de extracci\u00f3n prevista. Para archivos TAR, esto puede escalarse a escrituras de archivos arbitrarias encadenando con una entrada de enlace simb\u00f3lico, otorgando una primitiva de escritura completa en el sistema de archivos de destino sujeta a los permisos del proceso en ejecuci\u00f3n."
        }
      ],
      "id": "CVE-2026-44788",
      "lastModified": "2026-07-24T11:10:00.170",
      "metrics": {
        "cvssMetricV31": [
          {
            "cvssData": {
              "attackComplexity": "HIGH",
              "attackVector": "NETWORK",
              "availabilityImpact": "LOW",
              "baseScore": 5.9,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "HIGH",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "REQUIRED",
              "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L",
              "version": "3.1"
            },
            "exploitabilityScore": 1.6,
            "impactScore": 4.2,
            "source": "security-advisories@github.com",
            "type": "Secondary"
          },
          {
            "cvssData": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "NONE",
              "baseScore": 6.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "HIGH",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "REQUIRED",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
              "version": "3.1"
            },
            "exploitabilityScore": 2.8,
            "impactScore": 3.6,
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ],
        "ssvcV203": [
          {
            "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
            "ssvcData": {
              "id": "CVE-2026-44788",
              "options": [
                {
                  "exploitation": "poc"
                },
                {
                  "automatable": "no"
                },
                {
                  "technicalImpact": "partial"
                }
              ],
              "role": "CISA Coordinator",
              "timestamp": "2026-05-27T12:46:10.326841Z",
              "version": "2.0.3"
            }
          }
        ]
      },
      "published": "2026-05-26T22:16:42.587",
      "references": [
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Exploit",
            "Mitigation",
            "Vendor Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338"
        },
        {
          "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "tags": [
            "Exploit",
            "Mitigation",
            "Vendor Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338"
        }
      ],
      "sourceIdentifier": "security-advisories@github.com",
      "vulnStatus": "Analyzed",
      "weaknesses": [
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-22"
            }
          ],
          "source": "security-advisories@github.com",
          "type": "Secondary"
        }
      ]
    }

    FKIE_CVE-2021-39208

    Vulnerability from fkie_nvd - Published: 2021-09-16 15:15 - Updated: 2026-06-17 04:03
    Summary
    SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0.
    Impacted products
    Vendor Product Version
    sharpcompress_project sharpcompress *

    {
      "affected": [
        {
          "affectedData": [
            {
              "product": "sharpcompress",
              "vendor": "adamhathcock",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c 0.29.0"
                }
              ]
            }
          ],
          "source": "security-advisories@github.com"
        }
      ],
      "configurations": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:sharpcompress_project:sharpcompress:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "02472E3A-1B21-4431-B1F0-BB3190028F16",
                  "versionEndExcluding": "0.29.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "cveTags": [],
      "descriptions": [
        {
          "lang": "en",
          "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0."
        },
        {
          "lang": "es",
          "value": "SharpCompress es una biblioteca de C# totalmente administrada para tratar con muchos tipos y formatos de compresi\u00f3n. Las versiones anteriores a 0.29.0 son vulnerables a un salto de ruta parcial. SharpCompress recrea una jerarqu\u00eda de directorios bajo destinationDirectory si ExtractFullPath es establecido en true en las opciones. Para evitar una extracci\u00f3n fuera del directorio de destino, es verificado que la ruta destinationFileName comience con fullDestinationDirectoryPath. Sin embargo, antes de la versi\u00f3n 0.29.0, no se exige que fullDestinationDirectoryPath termine con una barra. Si el destinationDirectory no termina en barra como \"/home/user/dir\" es posible crear un archivo con un nombre que comienza como el directorio de destino un nivel m\u00e1s arriba del directorio, es decir, \"/home/user/dir.sh\". Debido a las restricciones del nombre del archivo y del directorio de destino, el impacto de la creaci\u00f3n arbitraria de archivos es limitado y depende del caso de uso. Este problema es corregido en SharpCompress versi\u00f3n 0.29.0"
        }
      ],
      "id": "CVE-2021-39208",
      "lastModified": "2026-06-17T04:03:18.913",
      "metrics": {
        "cvssMetricV2": [
          {
            "acInsufInfo": false,
            "baseSeverity": "MEDIUM",
            "cvssData": {
              "accessComplexity": "LOW",
              "accessVector": "NETWORK",
              "authentication": "SINGLE",
              "availabilityImpact": "NONE",
              "baseScore": 4.0,
              "confidentialityImpact": "NONE",
              "integrityImpact": "PARTIAL",
              "vectorString": "AV:N/AC:L/Au:S/C:N/I:P/A:N",
              "version": "2.0"
            },
            "exploitabilityScore": 8.0,
            "impactScore": 2.9,
            "obtainAllPrivilege": false,
            "obtainOtherPrivilege": false,
            "obtainUserPrivilege": false,
            "source": "nvd@nist.gov",
            "type": "Primary",
            "userInteractionRequired": false
          }
        ],
        "cvssMetricV31": [
          {
            "cvssData": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "NONE",
              "baseScore": 4.3,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "LOW",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
              "version": "3.1"
            },
            "exploitabilityScore": 2.8,
            "impactScore": 1.4,
            "source": "security-advisories@github.com",
            "type": "Secondary"
          }
        ]
      },
      "published": "2021-09-16T15:15:07.390",
      "references": [
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Patch",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
        },
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Release Notes",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
        },
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Release Notes",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
        }
      ],
      "sourceIdentifier": "security-advisories@github.com",
      "vulnStatus": "Modified",
      "weaknesses": [
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-22"
            }
          ],
          "source": "security-advisories@github.com",
          "type": "Secondary"
        }
      ]
    }

    FKIE_CVE-2018-1002206

    Vulnerability from fkie_nvd - Published: 2018-07-25 17:29 - Updated: 2026-06-17 01:33
    Summary
    SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as 'Zip-Slip'.
    Impacted products
    Vendor Product Version
    adamhathcock sharpcompress *

    {
      "affected": [
        {
          "affectedData": [
            {
              "product": "SharpCompress",
              "vendor": "SharpCompress",
              "versions": [
                {
                  "lessThan": "0.21.0",
                  "status": "affected",
                  "version": "unspecified",
                  "versionType": "custom"
                }
              ]
            }
          ],
          "source": "report@snyk.io"
        }
      ],
      "configurations": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:adamhathcock:sharpcompress:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "F251A98A-FA0D-4CB1-84C8-7F04F5D02AD9",
                  "versionEndExcluding": "0.21.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "cveTags": [],
      "descriptions": [
        {
          "lang": "en",
          "value": "SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as \u0027Zip-Slip\u0027."
        },
        {
          "lang": "es",
          "value": "SharpCompress en versiones anteriores a la 0.21.0 es vulnerable a un salto de directorio, lo que permite que los atacantes escriban en archivos arbitrarios mediante un ../ (punto punto barra) en una entrada de archivo Zip que se gestiona de manera incorrecta durante la extracci\u00f3n. Esta vulnerabilidad tambi\u00e9n se conoce como \"Zip-Slip\"."
        }
      ],
      "id": "CVE-2018-1002206",
      "lastModified": "2026-06-17T01:33:21.880",
      "metrics": {
        "cvssMetricV2": [
          {
            "acInsufInfo": false,
            "baseSeverity": "MEDIUM",
            "cvssData": {
              "accessComplexity": "MEDIUM",
              "accessVector": "NETWORK",
              "authentication": "NONE",
              "availabilityImpact": "NONE",
              "baseScore": 4.3,
              "confidentialityImpact": "NONE",
              "integrityImpact": "PARTIAL",
              "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N",
              "version": "2.0"
            },
            "exploitabilityScore": 8.6,
            "impactScore": 2.9,
            "obtainAllPrivilege": false,
            "obtainOtherPrivilege": false,
            "obtainUserPrivilege": false,
            "source": "nvd@nist.gov",
            "type": "Primary",
            "userInteractionRequired": true
          }
        ],
        "cvssMetricV30": [
          {
            "cvssData": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "NONE",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "HIGH",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "REQUIRED",
              "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
              "version": "3.0"
            },
            "exploitabilityScore": 1.8,
            "impactScore": 3.6,
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      },
      "published": "2018-07-25T17:29:01.940",
      "references": [
        {
          "source": "report@snyk.io",
          "tags": [
            "Issue Tracking",
            "Patch",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
        },
        {
          "source": "report@snyk.io",
          "tags": [
            "Issue Tracking",
            "Patch",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
        },
        {
          "source": "report@snyk.io",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://github.com/snyk/zip-slip-vulnerability"
        },
        {
          "source": "report@snyk.io",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://snyk.io/research/zip-slip-vulnerability"
        },
        {
          "source": "report@snyk.io",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Issue Tracking",
            "Patch",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Issue Tracking",
            "Patch",
            "Third Party Advisory"
          ],
          "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://github.com/snyk/zip-slip-vulnerability"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://snyk.io/research/zip-slip-vulnerability"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
        }
      ],
      "sourceIdentifier": "report@snyk.io",
      "vulnStatus": "Modified",
      "weaknesses": [
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-22"
            }
          ],
          "source": "report@snyk.io",
          "type": "Secondary"
        },
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-22"
            }
          ],
          "source": "nvd@nist.gov",
          "type": "Primary"
        }
      ]
    }

    CVE-2026-44788 (GCVE-0-2026-44788)

    Vulnerability from nvd – Published: 2026-05-26 21:32 – Updated: 2026-05-27 12:46
    VLAI
    Title
    SharpCompress: Directory traversal via directory entries in WriteToDirectory (zip slip variant)
    Summary
    SharpCompress is a fully managed C# library to deal with many compression types and formats. In 0.47.4 and earlier, 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.
    SSVC
    Exploitation: poc Automatable: no Technical Impact: partial
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2026-05-27 12:46 UTC
    CWE
    • CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
    Assigner
    GitHub_M CNA under the mitre root
    CNA scorecard C 72/100 over 7832 records in the last 180 days details
    References
    Impacted products
    Vendor Product Version
    adamhathcock sharpcompress Affected: <= 0.47.4
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-44788",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-05-27T12:46:10.326841Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-05-27T12:46:16.036Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "references": [
              {
                "tags": [
                  "exploit"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338"
              }
            ],
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "sharpcompress",
              "vendor": "adamhathcock",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c= 0.47.4"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. In 0.47.4 and earlier, 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."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "HIGH",
                "attackVector": "NETWORK",
                "availabilityImpact": "LOW",
                "baseScore": 5.9,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-22",
                  "description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-05-26T21:32:00.845Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338"
            }
          ],
          "source": {
            "advisory": "GHSA-6c8g-7p36-r338",
            "discovery": "UNKNOWN"
          },
          "title": "SharpCompress: Directory traversal via directory entries in WriteToDirectory (zip slip variant)"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-44788",
        "datePublished": "2026-05-26T21:32:00.845Z",
        "dateReserved": "2026-05-07T19:20:44.691Z",
        "dateUpdated": "2026-05-27T12:46:16.036Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }

    CVE-2021-39208 (GCVE-0-2021-39208)

    Vulnerability from nvd – Published: 2021-09-16 14:35 – Updated: 2024-08-04 01:58
    VLAI
    Title
    WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal.
    Summary
    SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0.
    CWE
    • CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
    Assigner
    GitHub_M CNA under the mitre root
    CNA scorecard C 72/100 over 7832 records in the last 180 days details
    Impacted products
    Vendor Product Version
    adamhathcock sharpcompress Affected: < 0.29.0
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-04T01:58:18.179Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
              }
            ],
            "title": "CVE Program Container"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "sharpcompress",
              "vendor": "adamhathcock",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c 0.29.0"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 4.3,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "LOW",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-22",
                  "description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2021-09-16T14:35:11.000Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
            }
          ],
          "source": {
            "advisory": "GHSA-jp7f-grcv-6mjf",
            "discovery": "UNKNOWN"
          },
          "title": "WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal.",
          "x_legacyV4Record": {
            "CVE_data_meta": {
              "ASSIGNER": "security-advisories@github.com",
              "ID": "CVE-2021-39208",
              "STATE": "PUBLIC",
              "TITLE": "WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal."
            },
            "affects": {
              "vendor": {
                "vendor_data": [
                  {
                    "product": {
                      "product_data": [
                        {
                          "product_name": "sharpcompress",
                          "version": {
                            "version_data": [
                              {
                                "version_value": "\u003c 0.29.0"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "vendor_name": "adamhathcock"
                  }
                ]
              }
            },
            "data_format": "MITRE",
            "data_type": "CVE",
            "data_version": "4.0",
            "description": {
              "description_data": [
                {
                  "lang": "eng",
                  "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0."
                }
              ]
            },
            "impact": {
              "cvss": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 4.3,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "LOW",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
                "version": "3.1"
              }
            },
            "problemtype": {
              "problemtype_data": [
                {
                  "description": [
                    {
                      "lang": "eng",
                      "value": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)"
                    }
                  ]
                }
              ]
            },
            "references": {
              "reference_data": [
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf",
                  "refsource": "CONFIRM",
                  "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/pull/614",
                  "refsource": "MISC",
                  "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0",
                  "refsource": "MISC",
                  "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
                }
              ]
            },
            "source": {
              "advisory": "GHSA-jp7f-grcv-6mjf",
              "discovery": "UNKNOWN"
            }
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2021-39208",
        "datePublished": "2021-09-16T14:35:11.000Z",
        "dateReserved": "2021-08-16T00:00:00.000Z",
        "dateUpdated": "2024-08-04T01:58:18.179Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }

    CVE-2018-1002206 (GCVE-0-2018-1002206)

    Vulnerability from nvd – Published: 2018-07-25 17:00 – Updated: 2024-09-17 03:29
    VLAI
    Summary
    SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as 'Zip-Slip'.
    Severity
    No CVSS data available.
    CWE
    Assigner
    snyk CNA under the mitre root
    CNA scorecard – unranked: 7 records in the last 180 days, 10 needed details
    Impacted products
    Vendor Product Version
    SharpCompress SharpCompress Affected: unspecified , < 0.21.0 (custom)
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-05T12:47:57.470Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://snyk.io/research/zip-slip-vulnerability"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/snyk/zip-slip-vulnerability"
              },
              {
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
              },
              {
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
              }
            ],
            "title": "CVE Program Container"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "SharpCompress",
              "vendor": "SharpCompress",
              "versions": [
                {
                  "lessThan": "0.21.0",
                  "status": "affected",
                  "version": "unspecified",
                  "versionType": "custom"
                }
              ]
            }
          ],
          "dateAssigned": "2018-05-17T00:00:00.000Z",
          "descriptions": [
            {
              "lang": "en",
              "value": "SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as \u0027Zip-Slip\u0027."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-22",
                  "description": "CWE-22",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2018-07-25T17:00:00.000Z",
            "orgId": "bae035ff-b466-4ff4-94d0-fc9efd9e1730",
            "shortName": "snyk"
          },
          "references": [
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://snyk.io/research/zip-slip-vulnerability"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/snyk/zip-slip-vulnerability"
            },
            {
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
            },
            {
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
            }
          ],
          "x_legacyV4Record": {
            "CVE_data_meta": {
              "ASSIGNER": "report@snyk.io",
              "DATE_ASSIGNED": "2018-05-17T10:52Z",
              "ID": "CVE-2018-1002206",
              "REQUESTER": "danny@snyk.io",
              "STATE": "PUBLIC",
              "UPDATED": "2018-05-17T10:52Z"
            },
            "affects": {
              "vendor": {
                "vendor_data": [
                  {
                    "product": {
                      "product_data": [
                        {
                          "product_name": "SharpCompress",
                          "version": {
                            "version_data": [
                              {
                                "version_affected": "\u003c",
                                "version_value": "0.21.0"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "vendor_name": "SharpCompress"
                  }
                ]
              }
            },
            "data_format": "MITRE",
            "data_type": "CVE",
            "data_version": "4.0",
            "description": {
              "description_data": [
                {
                  "lang": "eng",
                  "value": "SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as \u0027Zip-Slip\u0027."
                }
              ]
            },
            "problemtype": {
              "problemtype_data": [
                {
                  "description": [
                    {
                      "lang": "eng",
                      "value": "CWE-22"
                    }
                  ]
                }
              ]
            },
            "references": {
              "reference_data": [
                {
                  "name": "https://snyk.io/research/zip-slip-vulnerability",
                  "refsource": "MISC",
                  "url": "https://snyk.io/research/zip-slip-vulnerability"
                },
                {
                  "name": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246",
                  "refsource": "MISC",
                  "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
                },
                {
                  "name": "https://github.com/snyk/zip-slip-vulnerability",
                  "refsource": "MISC",
                  "url": "https://github.com/snyk/zip-slip-vulnerability"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/pull/374",
                  "refsource": "CONFIRM",
                  "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6",
                  "refsource": "CONFIRM",
                  "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
                }
              ]
            }
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "bae035ff-b466-4ff4-94d0-fc9efd9e1730",
        "assignerShortName": "snyk",
        "cveId": "CVE-2018-1002206",
        "datePublished": "2018-07-25T17:00:00.000Z",
        "dateReserved": "2018-07-25T00:00:00.000Z",
        "dateUpdated": "2024-09-17T03:29:09.493Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }

    CVE-2026-44788 (GCVE-0-2026-44788)

    Vulnerability from cvelistv5 – Published: 2026-05-26 21:32 – Updated: 2026-05-27 12:46
    VLAI
    Title
    SharpCompress: Directory traversal via directory entries in WriteToDirectory (zip slip variant)
    Summary
    SharpCompress is a fully managed C# library to deal with many compression types and formats. In 0.47.4 and earlier, 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.
    SSVC
    Exploitation: poc Automatable: no Technical Impact: partial
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2026-05-27 12:46 UTC
    CWE
    • CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
    Assigner
    GitHub_M CNA under the mitre root
    CNA scorecard C 72/100 over 7832 records in the last 180 days details
    References
    Impacted products
    Vendor Product Version
    adamhathcock sharpcompress Affected: <= 0.47.4
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-44788",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-05-27T12:46:10.326841Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-05-27T12:46:16.036Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "references": [
              {
                "tags": [
                  "exploit"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338"
              }
            ],
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "sharpcompress",
              "vendor": "adamhathcock",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c= 0.47.4"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. In 0.47.4 and earlier, 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."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "HIGH",
                "attackVector": "NETWORK",
                "availabilityImpact": "LOW",
                "baseScore": 5.9,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-22",
                  "description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-05-26T21:32:00.845Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-6c8g-7p36-r338"
            }
          ],
          "source": {
            "advisory": "GHSA-6c8g-7p36-r338",
            "discovery": "UNKNOWN"
          },
          "title": "SharpCompress: Directory traversal via directory entries in WriteToDirectory (zip slip variant)"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-44788",
        "datePublished": "2026-05-26T21:32:00.845Z",
        "dateReserved": "2026-05-07T19:20:44.691Z",
        "dateUpdated": "2026-05-27T12:46:16.036Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }

    CVE-2021-39208 (GCVE-0-2021-39208)

    Vulnerability from cvelistv5 – Published: 2021-09-16 14:35 – Updated: 2024-08-04 01:58
    VLAI
    Title
    WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal.
    Summary
    SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0.
    CWE
    • CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
    Assigner
    GitHub_M CNA under the mitre root
    CNA scorecard C 72/100 over 7832 records in the last 180 days details
    Impacted products
    Vendor Product Version
    adamhathcock sharpcompress Affected: < 0.29.0
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-04T01:58:18.179Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
              }
            ],
            "title": "CVE Program Container"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "sharpcompress",
              "vendor": "adamhathcock",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c 0.29.0"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 4.3,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "LOW",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-22",
                  "description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2021-09-16T14:35:11.000Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
            }
          ],
          "source": {
            "advisory": "GHSA-jp7f-grcv-6mjf",
            "discovery": "UNKNOWN"
          },
          "title": "WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal.",
          "x_legacyV4Record": {
            "CVE_data_meta": {
              "ASSIGNER": "security-advisories@github.com",
              "ID": "CVE-2021-39208",
              "STATE": "PUBLIC",
              "TITLE": "WriteEntryToDirectory used for an archive extraction is vulnerable to partial path traversal."
            },
            "affects": {
              "vendor": {
                "vendor_data": [
                  {
                    "product": {
                      "product_data": [
                        {
                          "product_name": "sharpcompress",
                          "version": {
                            "version_data": [
                              {
                                "version_value": "\u003c 0.29.0"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "vendor_name": "adamhathcock"
                  }
                ]
              }
            },
            "data_format": "MITRE",
            "data_type": "CVE",
            "data_version": "4.0",
            "description": {
              "description_data": [
                {
                  "lang": "eng",
                  "value": "SharpCompress is a fully managed C# library to deal with many compression types and formats. Versions prior to 0.29.0 are vulnerable to partial path traversal. 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, prior to version 0.29.0, 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`. Because of the file name and destination directory constraints the arbitrary file creation impact is limited and depends on the use case. This issue is fixed in SharpCompress version 0.29.0."
                }
              ]
            },
            "impact": {
              "cvss": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 4.3,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "LOW",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
                "version": "3.1"
              }
            },
            "problemtype": {
              "problemtype_data": [
                {
                  "description": [
                    {
                      "lang": "eng",
                      "value": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)"
                    }
                  ]
                }
              ]
            },
            "references": {
              "reference_data": [
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf",
                  "refsource": "CONFIRM",
                  "url": "https://github.com/adamhathcock/sharpcompress/security/advisories/GHSA-jp7f-grcv-6mjf"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/pull/614",
                  "refsource": "MISC",
                  "url": "https://github.com/adamhathcock/sharpcompress/pull/614"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0",
                  "refsource": "MISC",
                  "url": "https://github.com/adamhathcock/sharpcompress/releases/tag/0.29.0"
                }
              ]
            },
            "source": {
              "advisory": "GHSA-jp7f-grcv-6mjf",
              "discovery": "UNKNOWN"
            }
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2021-39208",
        "datePublished": "2021-09-16T14:35:11.000Z",
        "dateReserved": "2021-08-16T00:00:00.000Z",
        "dateUpdated": "2024-08-04T01:58:18.179Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }

    CVE-2018-1002206 (GCVE-0-2018-1002206)

    Vulnerability from cvelistv5 – Published: 2018-07-25 17:00 – Updated: 2024-09-17 03:29
    VLAI
    Summary
    SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as 'Zip-Slip'.
    Severity
    No CVSS data available.
    CWE
    Assigner
    snyk CNA under the mitre root
    CNA scorecard – unranked: 7 records in the last 180 days, 10 needed details
    Impacted products
    Vendor Product Version
    SharpCompress SharpCompress Affected: unspecified , < 0.21.0 (custom)
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-05T12:47:57.470Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://snyk.io/research/zip-slip-vulnerability"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
              },
              {
                "tags": [
                  "x_refsource_MISC",
                  "x_transferred"
                ],
                "url": "https://github.com/snyk/zip-slip-vulnerability"
              },
              {
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
              },
              {
                "tags": [
                  "x_refsource_CONFIRM",
                  "x_transferred"
                ],
                "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
              }
            ],
            "title": "CVE Program Container"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "SharpCompress",
              "vendor": "SharpCompress",
              "versions": [
                {
                  "lessThan": "0.21.0",
                  "status": "affected",
                  "version": "unspecified",
                  "versionType": "custom"
                }
              ]
            }
          ],
          "dateAssigned": "2018-05-17T00:00:00.000Z",
          "descriptions": [
            {
              "lang": "en",
              "value": "SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as \u0027Zip-Slip\u0027."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-22",
                  "description": "CWE-22",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2018-07-25T17:00:00.000Z",
            "orgId": "bae035ff-b466-4ff4-94d0-fc9efd9e1730",
            "shortName": "snyk"
          },
          "references": [
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://snyk.io/research/zip-slip-vulnerability"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
            },
            {
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/snyk/zip-slip-vulnerability"
            },
            {
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
            },
            {
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
            }
          ],
          "x_legacyV4Record": {
            "CVE_data_meta": {
              "ASSIGNER": "report@snyk.io",
              "DATE_ASSIGNED": "2018-05-17T10:52Z",
              "ID": "CVE-2018-1002206",
              "REQUESTER": "danny@snyk.io",
              "STATE": "PUBLIC",
              "UPDATED": "2018-05-17T10:52Z"
            },
            "affects": {
              "vendor": {
                "vendor_data": [
                  {
                    "product": {
                      "product_data": [
                        {
                          "product_name": "SharpCompress",
                          "version": {
                            "version_data": [
                              {
                                "version_affected": "\u003c",
                                "version_value": "0.21.0"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "vendor_name": "SharpCompress"
                  }
                ]
              }
            },
            "data_format": "MITRE",
            "data_type": "CVE",
            "data_version": "4.0",
            "description": {
              "description_data": [
                {
                  "lang": "eng",
                  "value": "SharpCompress before 0.21.0 is vulnerable to directory traversal, allowing attackers to write to arbitrary files via a ../ (dot dot slash) in a Zip archive entry that is mishandled during extraction. This vulnerability is also known as \u0027Zip-Slip\u0027."
                }
              ]
            },
            "problemtype": {
              "problemtype_data": [
                {
                  "description": [
                    {
                      "lang": "eng",
                      "value": "CWE-22"
                    }
                  ]
                }
              ]
            },
            "references": {
              "reference_data": [
                {
                  "name": "https://snyk.io/research/zip-slip-vulnerability",
                  "refsource": "MISC",
                  "url": "https://snyk.io/research/zip-slip-vulnerability"
                },
                {
                  "name": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246",
                  "refsource": "MISC",
                  "url": "https://snyk.io/vuln/SNYK-DOTNET-SHARPCOMPRESS-60246"
                },
                {
                  "name": "https://github.com/snyk/zip-slip-vulnerability",
                  "refsource": "MISC",
                  "url": "https://github.com/snyk/zip-slip-vulnerability"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/pull/374",
                  "refsource": "CONFIRM",
                  "url": "https://github.com/adamhathcock/sharpcompress/pull/374"
                },
                {
                  "name": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6",
                  "refsource": "CONFIRM",
                  "url": "https://github.com/adamhathcock/sharpcompress/commit/42b1205fb435de523e6ef8ac5b7bafbe712997f6"
                }
              ]
            }
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "bae035ff-b466-4ff4-94d0-fc9efd9e1730",
        "assignerShortName": "snyk",
        "cveId": "CVE-2018-1002206",
        "datePublished": "2018-07-25T17:00:00.000Z",
        "dateReserved": "2018-07-25T00:00:00.000Z",
        "dateUpdated": "2024-09-17T03:29:09.493Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }