Vulnerabilities in pkg:golang/github.com/gen2brain/go-unarr
PACKAGECVE-2021-38197 is a CRITICAL (CVSS 9.8) tarslip vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/gen2brain/go unarr libraries in the Go ecosystem. The issue involves tarslip in go-unarr. Remediation is available by upgrading affected packages to version 0.1.4.
pkg:golang/github.com/gen2brain/go-unarr
Vulnerability advisories affecting package pkg:golang/github.com/gen2brain/go-unarr. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v9j4-cp63-qv62 | CVE-2021-38197 | CRITICAL | Tarslip in go-unarr |
CVE-2021-38197 at a Glance
Security Impact
CVSS: 9.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:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-38197
To remediate this vulnerability, upgrade all affected Github.com/gen2brain/go unarr 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/gen2brain/go-unarr to 0.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gen2brain/go-unarr
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-38197, inspect your project dependencies for Github.com/gen2brain/go unarr:
inspect dependencies for github.com/gen2brain/go-unarr
Analyze the terminal output to locate any version of Github.com/gen2brain/go unarr in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.4), 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/gen2brain/go unarr, 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-2021-38197 Affected Github.com/gen2brain/go unarr Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gen2brain/go-unarr
|
Go |
< 0.1.4
|
0.1.4
|
References
Frequently Asked Questions
What is CVE-2021-38197?
Which Github.com/gen2brain/go unarr versions are affected?
What version fixes CVE-2021-38197?
Is github.com/gen2brain/go-unarr affected?
What is the CVSS score of CVE-2021-38197?
What CWE is associated with CVE-2021-38197?
How can I check Go dependencies for CVE-2021-38197?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v9j4-cp63-qv62",
"modified" : "2021-08-30T21:24:59Z",
"published" : "2021-09-01T18:32:02Z",
"aliases" : [ "CVE-2021-38197" ],
"summary" : "Tarslip in go-unarr",
"details" : "unarr.go in go-unarr (aka Go bindings for unarr) 0.1.1 allows Directory Traversal via ../ in a pathname within a TAR archive.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gen2brain/go-unarr"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-38197"
}, {
"type" : "WEB",
"url" : "https://github.com/gen2brain/go-unarr/issues/21"
}, {
"type" : "WEB",
"url" : "https://github.com/gen2brain/go-unarr/commit/239ec404d348280b50bbf671327709e8857fc5f4"
}, {
"type" : "WEB",
"url" : "https://github.com/gen2brain/go-unarr/releases/tag/v0.1.4"
}, {
"type" : "PACKAGE",
"url" : "github.com/gen2brain/go-unarr"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-30T21:24:59Z",
"nvd_published_at" : "2021-08-08T16:15:00Z"
}
}