Vulnerabilities in pkg:golang/github.com/containernetworking/cni
PACKAGECVE-2021-20206 is a HIGH (CVSS 7.2) containernetworking/cni improper limitation of path vulnerability (CWE-20: Improper Input Validation) affecting Github.com/containernetworking/cni libraries in the Go ecosystem. The issue involves containernetworking/cni improper limitation of path name. Remediation is available by upgrading affected packages to version 0.8.1.
pkg:golang/github.com/containernetworking/cni
Vulnerability advisories affecting package pkg:golang/github.com/containernetworking/cni. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-xjqr-g762-pxwp | CVE-2021-20206 | HIGH | containernetworking/cni improper limitation of path name |
CVE-2021-20206 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-20206
To remediate this vulnerability, upgrade all affected Github.com/containernetworking/cni 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/containernetworking/cni to 0.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/containernetworking/cni
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-20206, inspect your project dependencies for Github.com/containernetworking/cni:
inspect dependencies for github.com/containernetworking/cni
Analyze the terminal output to locate any version of Github.com/containernetworking/cni in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/containernetworking/cni, 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-20206 Affected Github.com/containernetworking/cni Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/containernetworking/cni
|
Go |
< 0.8.1
|
0.8.1
|
References
Frequently Asked Questions
What is CVE-2021-20206?
Which Github.com/containernetworking/cni versions are affected?
What version fixes CVE-2021-20206?
Is github.com/containernetworking/cni affected?
What is the CVSS score of CVE-2021-20206?
What CWE is associated with CVE-2021-20206?
How can I check Go dependencies for CVE-2021-20206?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xjqr-g762-pxwp",
"modified" : "2023-10-02T13:12:28Z",
"published" : "2022-02-15T01:57:18Z",
"aliases" : [ "CVE-2021-20206" ],
"summary" : "containernetworking/cni improper limitation of path name",
"details" : "An improper limitation of path name flaw was found in containernetworking/cni in versions before 0.8.1. When specifying the plugin to load in the 'type' field in the network configuration, it is possible to use special elements such as \"../\" separators to reference binaries elsewhere on the system. This flaw allows an attacker to execute other existing binaries other than the cni plugins/types, such as 'reboot'. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.\n### Specific Go Packages Affected\ngithub.com/containernetworking/cni/pkg/invoke",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containernetworking/cni"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-20206"
}, {
"type" : "WEB",
"url" : "https://github.com/containernetworking/cni/pull/808"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1919391"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/containernetworking/cni"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0230"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMCONTAINERNETWORKINGCNIPKGINVOKE-1070549"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-18T21:07:06Z",
"nvd_published_at" : "2021-03-26T22:15:00Z"
}
}