Vulnerabilities in pkg:golang/github.com/duke-git/lancet/v2
PACKAGECVE-2022-41920 is a HIGH (CVSS 8.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/duke git/lancet/v2 libraries in the Go ecosystem. The issue involves lancet vulnerable to path traversal when unzipping files. Remediation is available by upgrading affected packages to version 2.1.10, 1.3.4.
pkg:golang/github.com/duke-git/lancet/v2
Vulnerability advisories affecting package pkg:golang/github.com/duke-git/lancet/v2. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-pp3f-xrw5-q5j4 | CVE-2022-41920 | HIGH | Lancet vulnerable to path traversal when unzipping files |
CVE-2022-41920 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-41920
To remediate this vulnerability, upgrade all affected Github.com/duke git/lancet/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/duke-git/lancet/v2 to 2.1.10
Upgrade github.com/duke-git/lancet to 1.3.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/duke-git/lancet/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-41920, inspect your project dependencies for Github.com/duke git/lancet/v2:
inspect dependencies for github.com/duke-git/lancet/v2
Analyze the terminal output to locate any version of Github.com/duke git/lancet/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.10), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/duke git/lancet/v2, 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
CVE-2022-41920 Affected Github.com/duke git/lancet/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/duke-git/lancet/v2
|
Go |
≥ 2.0.0
< 2.1.10
|
2.1.10
|
|
github.com/duke-git/lancet
|
Go |
< 1.3.4
|
1.3.4
|
References
Frequently Asked Questions
What is CVE-2022-41920?
Which Github.com/duke git/lancet/v2 versions are affected?
What version fixes CVE-2022-41920?
Is github.com/duke-git/lancet/v2 affected?
Is github.com/duke-git/lancet affected?
What is the CVSS score of CVE-2022-41920?
What CWE is associated with CVE-2022-41920?
How can I check Go dependencies for CVE-2022-41920?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pp3f-xrw5-q5j4",
"modified" : "2023-08-29T19:39:52Z",
"published" : "2022-11-21T22:31:31Z",
"aliases" : [ "CVE-2022-41920" ],
"summary" : "Lancet vulnerable to path traversal when unzipping files",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nZipSlip issue when use fileutil package to unzip files.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nIt will fixed in v2.1.10, Please upgrade version to v2.1.10 or above.\nUsers who use v1.x.x should upgrade v1.3.4 or above.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nNo, users have to upgrade version.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/duke-git/lancet/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.1.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/duke-git/lancet"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/duke-git/lancet/security/advisories/GHSA-pp3f-xrw5-q5j4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41920"
}, {
"type" : "WEB",
"url" : "https://github.com/duke-git/lancet/issues/62"
}, {
"type" : "WEB",
"url" : "https://github.com/duke-git/lancet/commit/f133b32faa05eb93e66175d01827afa4b7094572"
}, {
"type" : "WEB",
"url" : "https://github.com/duke-git/lancet/commit/f869a0a67098e92d24ddd913e188b32404fa72c9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/duke-git/lancet"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-1114"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-21T22:31:31Z",
"nvd_published_at" : "2022-11-17T18:15:00Z"
}
}