CVE-2020-7668: Github.com/unknwon/cae Path Traversal Vulnerability
HIGHCVE-2020-7668 is a HIGH (CVSS 7.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/unknwon/cae libraries in the Go ecosystem. The issue involves github.com/unknwon/cae path traversal vulnerability. Remediation is available by upgrading affected packages to version 1.0.1.
CVE-2020-7668 at a Glance
Security Impact
CVSS: 7.5
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:N/I:H/A:N).
How to Fix CVE-2020-7668
To remediate this vulnerability, upgrade all affected Github.com/unknwon/cae 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/unknwon/cae to 1.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/unknwon/cae
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-7668, inspect your project dependencies for Github.com/unknwon/cae:
inspect dependencies for github.com/unknwon/cae
Analyze the terminal output to locate any version of Github.com/unknwon/cae in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), 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/unknwon/cae, 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-2020-7668 Affected Github.com/unknwon/cae Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/unknwon/cae
|
Go |
< 1.0.1
|
1.0.1
|
References
Frequently Asked Questions
What is CVE-2020-7668?
Which Github.com/unknwon/cae versions are affected?
What version fixes CVE-2020-7668?
Is github.com/unknwon/cae affected?
What is the CVSS score of CVE-2020-7668?
What CWE is associated with CVE-2020-7668?
How can I check Go dependencies for CVE-2020-7668?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-88jf-7rch-32qc",
"modified" : "2023-08-30T11:23:31Z",
"published" : "2021-05-18T20:31:18Z",
"aliases" : [ "CVE-2020-7668" ],
"summary" : "github.com/unknwon/cae Path Traversal vulnerability",
"details" : "The ExtractTo function doesn't securely escape file paths in zip archives which include leading or non-leading \"..\". This allows an attacker to add or replace files system-wide.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/unknwon/cae"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7668"
}, {
"type" : "WEB",
"url" : "https://github.com/unknwon/cae/commit/07971c00a1bfd9dc171c3ad0bfab5b67c2287e11"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/unknwon/cae"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2020-0041"
}, {
"type" : "WEB",
"url" : "https://snyk.io/research/zip-slip-vulnerability"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMUNKNWONCAETZ-570384"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-12T20:32:28Z",
"nvd_published_at" : "2020-06-23T19:38:00Z"
}
}