CVE-2019-10743: Github.com/mholt/archiver Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-h74j-692g-48mq
CVSS 5.5
CWE-29 CWE-22
Published
Advisory Summary

CVE-2019-10743 is a MODERATE (CVSS 5.5) path traversal vulnerability (CWE-29: Path Traversal: '\..\filename') affecting Github.com/mholt/archiver libraries in the Go ecosystem. The issue involves path traversal in mholt archiver. Remediation is available by upgrading affected packages to version 3.3.2.

CVE-2019-10743 at a Glance

CVE Identifier CVE-2019-10743
GHSA Identifier GHSA-h74j-692g-48mq
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-29: Path Traversal: '\..\filename'
Affected Product Github.com/mholt/archiver
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2019-10743

To remediate this vulnerability, upgrade all affected Github.com/mholt/archiver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/mholt/archiver fixed: 3.3.2
Upgrade github.com/mholt/archiver to 3.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/mholt/archiver

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-10743, inspect your project dependencies for Github.com/mholt/archiver:

inspect dependencies for github.com/mholt/archiver

Analyze the terminal output to locate any version of Github.com/mholt/archiver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-29: Path Traversal: '\..\filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory. In Github.com/mholt/archiver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. ### Specific Go Packages Affected github.com/mholt/archiver/cmd/arc

CVE-2019-10743 Affected Github.com/mholt/archiver Versions

1 component(s)
Fixed Versions:
3.3.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/mholt/archiver
Go
≥ 3.0.0
< 3.3.2
3.3.2

References

Frequently Asked Questions

What is CVE-2019-10743?
CVE-2019-10743 is a security vulnerability in Github.com/mholt/archiver involving Path Traversal in MHolt Archiver under CWE-29: Path Traversal: '\..\filename'.
Which Github.com/mholt/archiver versions are affected?
Affected versions include releases prior to 3.3.2 across affected packages: github.com/mholt/archiver.
What version fixes CVE-2019-10743?
Upgrading to 3.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/mholt/archiver affected?
Yes, github.com/mholt/archiver is affected in releases prior to 3.3.2. Upgrade your dependency to 3.3.2 or later.
What is the CVSS score of CVE-2019-10743?
CVE-2019-10743 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-10743?
CVE-2019-10743 is classified under CWE-29: Path Traversal: '\..\filename' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory.).
How can I check Go dependencies for CVE-2019-10743?
Run the dependency tree command: 'inspect dependencies for github.com/mholt/archiver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h74j-692g-48mq",
  "modified" : "2024-02-13T16:32:29Z",
  "published" : "2021-05-18T15:31:53Z",
  "aliases" : [ "CVE-2019-10743" ],
  "summary" : "Path Traversal in MHolt Archiver",
  "details" : "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.\n\n### Specific Go Packages Affected\ngithub.com/mholt/archiver/cmd/arc",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/mholt/archiver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10743"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mholt/archiver/pull/169"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mholt/archiver/pull/203"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mholt/archiver/commit/8217ed3a206c0473b4ec1aff51375b398838073a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snyk/zip-slip-vulnerability"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/research/zip-slip-vulnerability"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMMHOLTARCHIVERCMDARC-174728"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-29" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-17T21:21:43Z",
    "nvd_published_at" : "2019-10-29T19:15:16Z"
  }
}