CVE-2022-0664: Github.com/gravitl/netmaker Use Of Hard-coded Cryptographic Key Vulnerability

HIGH
Advisory Identifier: GHSA-6rrw-4fm9-rghv
CVSS 8.8
CWE-321
Published
Advisory Summary

CVE-2022-0664 is a HIGH (CVSS 8.8) use of hard-coded cryptographic key vulnerability (CWE-321: Use of Hard-coded Cryptographic Key) affecting Github.com/gravitl/netmaker libraries in the Go ecosystem. The issue involves use of hard-coded cryptographic key in netmaker. Remediation is available by upgrading affected packages to version 0.8.5, 0.9.4.

CVE-2022-0664 at a Glance

CVE Identifier CVE-2022-0664
GHSA Identifier GHSA-6rrw-4fm9-rghv
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-321: Use of Hard-coded Cryptographic Key
Affected Product Github.com/gravitl/netmaker
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-0664

To remediate this vulnerability, upgrade all affected Github.com/gravitl/netmaker dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/gravitl/netmaker fixed: 0.8.5
Upgrade github.com/gravitl/netmaker to 0.8.5
github.com/gravitl/netmaker fixed: 0.9.4
Upgrade github.com/gravitl/netmaker to 0.9.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/gravitl/netmaker

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-0664, inspect your project dependencies for Github.com/gravitl/netmaker:

inspect dependencies for github.com/gravitl/netmaker

Analyze the terminal output to locate any version of Github.com/gravitl/netmaker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.5), 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-321: Use of Hard-coded Cryptographic Key, where the product uses a hard-coded, unchangeable cryptographic key. In Github.com/gravitl/netmaker, 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

Netmaker prior to versions 0.8.5, 0.9.4, 0.10.0, and 0.10.1 uses a hard-coded cryptographic key.

CVE-2022-0664 Affected Github.com/gravitl/netmaker Versions

2 component(s)
Fixed Versions:
0.8.50.9.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gravitl/netmaker
Go
< 0.8.5
0.8.5
github.com/gravitl/netmaker
Go
≥ 0.9.0
< 0.9.4
0.9.4

References

Frequently Asked Questions

What is CVE-2022-0664?
CVE-2022-0664 is a security vulnerability in Github.com/gravitl/netmaker involving Use of Hard-coded Cryptographic Key in Netmaker under CWE-321: Use of Hard-coded Cryptographic Key.
Which Github.com/gravitl/netmaker versions are affected?
Affected versions include releases prior to 0.8.5, 0.9.4 across affected packages: github.com/gravitl/netmaker.
What version fixes CVE-2022-0664?
Upgrading to 0.8.5, 0.9.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gravitl/netmaker affected?
Yes, github.com/gravitl/netmaker is affected in releases prior to 0.8.5, 0.9.4. Upgrade your dependency to 0.8.5, 0.9.4 or later.
What is the CVSS score of CVE-2022-0664?
CVE-2022-0664 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-0664?
CVE-2022-0664 is classified under CWE-321: Use of Hard-coded Cryptographic Key (The product uses a hard-coded, unchangeable cryptographic key.).
How can I check Go dependencies for CVE-2022-0664?
Run the dependency tree command: 'inspect dependencies for github.com/gravitl/netmaker'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6rrw-4fm9-rghv",
  "modified" : "2022-02-23T15:45:21Z",
  "published" : "2022-02-19T00:01:36Z",
  "aliases" : [ "CVE-2022-0664" ],
  "summary" : "Use of Hard-coded Cryptographic Key in Netmaker",
  "details" : "Netmaker prior to versions 0.8.5, 0.9.4, 0.10.0, and 0.10.1 uses a hard-coded cryptographic key.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gravitl/netmaker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gravitl/netmaker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.9.0"
      }, {
        "fixed" : "0.9.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0664"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gravitl/netmaker/commit/9bee12642986cb9534e268447b70e6f0f03c59cf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gravitl/netmaker"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/29898a42-fd4f-4b5b-a8e3-ab573cb87eac"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-02-23T15:45:21Z",
    "nvd_published_at" : "2022-02-18T14:15:00Z"
  }
}