Vulnerabilities in pkg:golang/github.com/edgexfoundry/device-sdk-go/v2

PACKAGE
Advisory Identifier: GHSA-g63h-q855-vp3q
Advisory Summary

CVE-2022-31066 is a MODERATE (CVSS 5.9) configuration api vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Github.com/edgexfoundry/device sdk go/v2 libraries in the Go ecosystem. The issue involves configuration api in edgexfoundry 2.1.0 and earlier exposes message bus credentials to local unauthenticated users. Remediation is available by upgrading affected packages to version 2.1.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/edgexfoundry/device-sdk-go/v2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/edgexfoundry/device-sdk-go/v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g63h-q855-vp3q CVE-2022-31066 MODERATE Configuration API in EdgeXFoundry 2.1.0 and earlier exposes message bus credentials to local unauthenticated users

CVE-2022-31066 at a Glance

CVE Identifier CVE-2022-31066
GHSA Identifier GHSA-g63h-q855-vp3q
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Github.com/edgexfoundry/device sdk go/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.9

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:N/S:U/C:L/I:L/A:L).

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

How to Fix CVE-2022-31066

To remediate this vulnerability, upgrade all affected Github.com/edgexfoundry/device sdk go/v2 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/edgexfoundry/device-sdk-go/v2 fixed: 2.1.1
Upgrade github.com/edgexfoundry/device-sdk-go/v2 to 2.1.1
github.com/edgexfoundry/app-functions-sdk-go/v2 fixed: 2.1.1
Upgrade github.com/edgexfoundry/app-functions-sdk-go/v2 to 2.1.1
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/edgexfoundry/device-sdk-go/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-31066, inspect your project dependencies for Github.com/edgexfoundry/device sdk go/v2:

inspect dependencies for github.com/edgexfoundry/device-sdk-go/v2

Analyze the terminal output to locate any version of Github.com/edgexfoundry/device sdk go/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Github.com/edgexfoundry/device sdk go/v2, 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

### Impact The /api/v2/config endpoint exposes message bus credentials to local unauthenticated users. In security-enabled mode, message bus credentials are supposed to be kept in the EdgeX secret store and require authentication to access. This vulnerability bypasses the access controls on message bus credentials when running in security-enabled mode. (No credentials are required when running in security-disabled mode.) As a result, attackers could intercept data or inject fake data into the EdgeX message bus. ### Patches Users should upgrade to EdgeXFoundry Kamakura release (2.2.0) or to the June 2022 EdgeXFoundry LTS Jakarta release (2.1.1). The issue has been patched in the following docker containers and snaps: #### Patched go modules github.com/edgexfoundry/device-sdk-go/v2 >= v2.1.1 github.com/edgexfoundry/app-functions-sdk-go/v2 >= v2.1.1 #### Patched docker containers URL: https://hub.docker.com/r/edgexfoundry - docker.io/edgexfoundry/core-metadata:>=2.1.1 - docker.io/edgexfoundry/core-metadata-arm64:>=2.1.1 - docker.io/edgexfoundry/core-data:>=2.1.1 - docker.io/edgexfoundry/core-data-arm64:>=2.1.1 - docker.io/edgexfoundry/core-command:>=2.1.1 - docker.io/edgexfoundry/core-command-arm64:>=2.1.1 - docker.io/edgexfoundry/support-notifications:>=2.1.1 - docker.io/edgexfoundry/support-notifications-arm64:>=2.1.1 - docker.io/edgexfoundry/support-scheduler:>=2.1.1 - docker.io/edgexfoundry/support-scheduler-arm64:>=2.1.1 - docker.io/edgexfoundry/sys-mgmt-agent:>=2.1.1 - docker.io/edgexfoundry/sys-mgmt-agent-arm64:>=2.1.1 - docker.io/edgexfoundry/security-proxy-setup:>=2.1.1 - docker.io/edgexfoundry/security-proxy-setup-arm64:>=2.1.1 - docker.io/edgexfoundry/security-secretstore-setup:>=2.1.1 - docker.io/edgexfoundry/security-secretstore-setup-arm64:>=2.1.1 - docker.io/edgexfoundry/security-bootstrapper:>=2.1.1 - docker.io/edgexfoundry/security-bootstrapper-arm64:>=2.1.1 - docker.io/edgexfoundry/app-rfid-llrp-inventory:>=2.1.1 - docker.io/edgexfoundry/app-rfid-llrp-inventory-arm64:>=2.1.1 - docker.io/edgexfoundry/app-service-configurable:>=2.1.1 - docker.io/edgexfoundry/app-service-configurable-arm64:>=2.1.1 - docker.io/edgexfoundry/device-camera:>=2.2.0 - docker.io/edgexfoundry/device-camera-arm64:>=2.2.0 - docker.io/edgexfoundry/device-gpio:>=2.1.1 - docker.io/edgexfoundry/device-gpio-arm64:>=2.1.1 - docker.io/edgexfoundry/device-modbus:>=2.1.1 - docker.io/edgexfoundry/device-modbus-arm64:>=2.1.1 - docker.io/edgexfoundry/device-mqtt:>=2.1.1 - docker.io/edgexfoundry/device-mqtt-arm64:>=2.1.1 - docker.io/edgexfoundry/device-rest:>=2.1.1 - docker.io/edgexfoundry/device-rest-arm64:>=2.1.1 - docker.io/edgexfoundry/device-rfid-llrp:>=2.1.1 - docker.io/edgexfoundry/device-rfid-llrp-arm64:>=2.1.1 - docker.io/edgexfoundry/device-snmp:>=2.1.1 - docker.io/edgexfoundry/device-snmp-arm64:>=2.1.1 - docker.io/edgexfoundry/device-virtual:>=2.1.1 - docker.io/edgexfoundry/device-virtual-arm64:>=2.1.1 #### Patched snaps URL: https://snapcraft.io/edgexfoundry edgexfoundry 2.1/stable (will be automatically upgraded to 2.1.1) ### Workarounds No workaround available. ### References * https://github.com/edgexfoundry/edgex-go/security/advisories/GHSA-g63h-q855-vp3q * https://github.com/edgexfoundry/device-sdk-go/pull/1161 (patch against Kamakura) * https://github.com/edgexfoundry/edgex-go/pull/4016 (patch against Kamakura) * https://github.com/edgexfoundry/edgex-go/pull/4039 (cherry-pick patch against Jakarta) * https://github.com/edgexfoundry/device-sdk-go/pull/1167 (differs from patch on main: don't copy PW in vs delete it after) ### For more information If you have any questions or comments about this advisory: * Contact us in the [Slack #security channel](https://slack.edgexfoundry.org/) * Open an issue in [edgex-go](https://github.com/edgexfoundry/edgex-go) * Email us at [EdgeX-TSC-Security@lists.edgexfoundry.org](mailto:EdgeX-TSC-Security@lists.edgexfoundry.org)

CVE-2022-31066 Affected Github.com/edgexfoundry/device sdk go/v2 Versions

2 component(s)
Fixed Versions:
2.1.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/edgexfoundry/device-sdk-go/v2
Go
< 2.1.1
2.1.1
github.com/edgexfoundry/app-functions-sdk-go/v2
Go
< 2.1.1
2.1.1

References

Frequently Asked Questions

What is CVE-2022-31066?
CVE-2022-31066 is a security vulnerability in Github.com/edgexfoundry/device sdk go/v2 involving Configuration API in EdgeXFoundry 2.1.0 and earlier exposes message bus credentials to local unauthenticated users under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Github.com/edgexfoundry/device sdk go/v2 versions are affected?
Affected versions include releases prior to 2.1.1 across affected packages: github.com/edgexfoundry/device-sdk-go/v2, github.com/edgexfoundry/app-functions-sdk-go/v2.
What version fixes CVE-2022-31066?
Upgrading to 2.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/edgexfoundry/device-sdk-go/v2 affected?
Yes, github.com/edgexfoundry/device-sdk-go/v2 is affected in releases prior to 2.1.1. Upgrade your dependency to 2.1.1 or later.
Is github.com/edgexfoundry/app-functions-sdk-go/v2 affected?
Yes, github.com/edgexfoundry/app-functions-sdk-go/v2 is affected in releases prior to 2.1.1. Upgrade your dependency to 2.1.1 or later.
What is the CVSS score of CVE-2022-31066?
CVE-2022-31066 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2022-31066?
CVE-2022-31066 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Go dependencies for CVE-2022-31066?
Run the dependency tree command: 'inspect dependencies for github.com/edgexfoundry/device-sdk-go/v2'. 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-g63h-q855-vp3q",
  "modified" : "2022-07-11T21:21:42Z",
  "published" : "2022-06-17T01:11:42Z",
  "aliases" : [ "CVE-2022-31066" ],
  "summary" : "Configuration API in EdgeXFoundry 2.1.0 and earlier exposes message bus credentials to local unauthenticated users",
  "details" : "### Impact\nThe /api/v2/config endpoint exposes message bus credentials to local unauthenticated users.  In security-enabled mode, message bus credentials are supposed to be kept in the EdgeX secret store and require authentication to access.  This vulnerability bypasses the access controls on message bus credentials when running in security-enabled mode.  (No credentials are required when running in security-disabled mode.)  As a result, attackers could intercept data or inject fake data into the EdgeX message bus.\n\n### Patches\nUsers should upgrade to EdgeXFoundry Kamakura release (2.2.0) or to the June 2022 EdgeXFoundry LTS Jakarta release (2.1.1).\n\nThe issue has been patched in the following docker containers and snaps:\n\n#### Patched go modules\ngithub.com/edgexfoundry/device-sdk-go/v2 >= v2.1.1\ngithub.com/edgexfoundry/app-functions-sdk-go/v2 >= v2.1.1\n\n#### Patched docker containers\nURL: https://hub.docker.com/r/edgexfoundry\n- docker.io/edgexfoundry/core-metadata:>=2.1.1\n- docker.io/edgexfoundry/core-metadata-arm64:>=2.1.1\n- docker.io/edgexfoundry/core-data:>=2.1.1\n- docker.io/edgexfoundry/core-data-arm64:>=2.1.1\n- docker.io/edgexfoundry/core-command:>=2.1.1\n- docker.io/edgexfoundry/core-command-arm64:>=2.1.1\n- docker.io/edgexfoundry/support-notifications:>=2.1.1\n- docker.io/edgexfoundry/support-notifications-arm64:>=2.1.1\n- docker.io/edgexfoundry/support-scheduler:>=2.1.1\n- docker.io/edgexfoundry/support-scheduler-arm64:>=2.1.1\n- docker.io/edgexfoundry/sys-mgmt-agent:>=2.1.1\n- docker.io/edgexfoundry/sys-mgmt-agent-arm64:>=2.1.1\n- docker.io/edgexfoundry/security-proxy-setup:>=2.1.1\n- docker.io/edgexfoundry/security-proxy-setup-arm64:>=2.1.1\n- docker.io/edgexfoundry/security-secretstore-setup:>=2.1.1\n- docker.io/edgexfoundry/security-secretstore-setup-arm64:>=2.1.1\n- docker.io/edgexfoundry/security-bootstrapper:>=2.1.1\n- docker.io/edgexfoundry/security-bootstrapper-arm64:>=2.1.1\n- docker.io/edgexfoundry/app-rfid-llrp-inventory:>=2.1.1\n- docker.io/edgexfoundry/app-rfid-llrp-inventory-arm64:>=2.1.1\n- docker.io/edgexfoundry/app-service-configurable:>=2.1.1\n- docker.io/edgexfoundry/app-service-configurable-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-camera:>=2.2.0\n- docker.io/edgexfoundry/device-camera-arm64:>=2.2.0\n- docker.io/edgexfoundry/device-gpio:>=2.1.1\n- docker.io/edgexfoundry/device-gpio-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-modbus:>=2.1.1\n- docker.io/edgexfoundry/device-modbus-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-mqtt:>=2.1.1\n- docker.io/edgexfoundry/device-mqtt-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-rest:>=2.1.1\n- docker.io/edgexfoundry/device-rest-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-rfid-llrp:>=2.1.1\n- docker.io/edgexfoundry/device-rfid-llrp-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-snmp:>=2.1.1\n- docker.io/edgexfoundry/device-snmp-arm64:>=2.1.1\n- docker.io/edgexfoundry/device-virtual:>=2.1.1\n- docker.io/edgexfoundry/device-virtual-arm64:>=2.1.1\n\n#### Patched snaps\nURL: https://snapcraft.io/edgexfoundry\nedgexfoundry  2.1/stable  (will be automatically upgraded to 2.1.1)\n\n### Workarounds\nNo workaround available.\n\n### References\n* https://github.com/edgexfoundry/edgex-go/security/advisories/GHSA-g63h-q855-vp3q\n* https://github.com/edgexfoundry/device-sdk-go/pull/1161 (patch against Kamakura)\n* https://github.com/edgexfoundry/edgex-go/pull/4016 (patch against Kamakura)\n* https://github.com/edgexfoundry/edgex-go/pull/4039 (cherry-pick patch against Jakarta)\n* https://github.com/edgexfoundry/device-sdk-go/pull/1167 (differs from patch on main: don't copy PW in vs delete it after)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Contact us in the [Slack #security channel](https://slack.edgexfoundry.org/)\n* Open an issue in [edgex-go](https://github.com/edgexfoundry/edgex-go)\n* Email us at [EdgeX-TSC-Security@lists.edgexfoundry.org](mailto:EdgeX-TSC-Security@lists.edgexfoundry.org)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/edgexfoundry/device-sdk-go/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/edgexfoundry/app-functions-sdk-go/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/edgexfoundry/edgex-go/security/advisories/GHSA-g63h-q855-vp3q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31066"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/edgexfoundry/device-sdk-go/pull/1161"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/edgexfoundry/edgex-go/pull/4016"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/edgexfoundry/edgex-go"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T01:11:42Z",
    "nvd_published_at" : "2022-06-14T22:15:00Z"
  }
}