CVE-2021-36376: Git delta Path Traversal Vulnerability
HIGHCVE-2021-36376 is a HIGH (CVSS 7.8) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Git delta libraries in the crates.io ecosystem. The issue involves relative path traversal in git-delta. Remediation is available by upgrading affected packages to version 0.8.3.
CVE-2021-36376 at a Glance
Security Impact
CVSS: 7.8
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:H/I:H/A:H).
How to Fix CVE-2021-36376
To remediate this vulnerability, upgrade all affected Git delta 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 git-delta to 0.8.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for git-delta
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-36376, inspect your project dependencies for Git delta:
inspect dependencies for git-delta
Analyze the terminal output to locate any version of Git delta in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.3), 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-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Git delta, 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-36376 Affected Git delta Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
git-delta
|
crates.io |
< 0.8.3
|
0.8.3
|
References
Frequently Asked Questions
What is CVE-2021-36376?
Which Git delta versions are affected?
What version fixes CVE-2021-36376?
Is git-delta affected?
What is the CVSS score of CVE-2021-36376?
What CWE is associated with CVE-2021-36376?
How can I check crates.io dependencies for CVE-2021-36376?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5xg3-j2j6-rcx4",
"modified" : "2021-09-09T16:46:42Z",
"published" : "2021-08-25T21:01:39Z",
"aliases" : [ "CVE-2021-36376" ],
"summary" : "Relative Path Traversal in git-delta",
"details" : "git-delta before 0.8.3 on Windows resolves an executable's pathname as a relative path from the current directory.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "git-delta"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-36376"
}, {
"type" : "WEB",
"url" : "https://github.com/dandavison/delta/commit/f01846bd443aaf92fdd5ac20f461beac3f6ee3fd"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dandavison/delta"
}, {
"type" : "WEB",
"url" : "https://github.com/dandavison/delta/releases/tag/0.8.3"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0105.html"
}, {
"type" : "WEB",
"url" : "https://vuln.ryotak.me/advisories/54"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-23", "CWE-427" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-07-14T19:06:14Z",
"nvd_published_at" : "2021-07-13T13:15:00Z"
}
}