CVE-2021-41278: Github.com/edgexfoundry/app functions sdk go/v2 Broken Encryption Vulnerability
MODERATECVE-2021-41278 is a MODERATE (CVSS 5.4) broken encryption vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Github.com/edgexfoundry/app functions sdk go/v2 libraries in the Go ecosystem. The issue involves broken encryption in edgex foundry. Remediation is available by upgrading affected packages to version 2.1.0.
CVE-2021-41278 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N).
How to Fix CVE-2021-41278
To remediate this vulnerability, upgrade all affected Github.com/edgexfoundry/app functions 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.
Upgrade github.com/edgexfoundry/app-functions-sdk-go/v2 to 2.1.0
Upgrade github.com/edgexfoundry/app-functions-sdk-go to Latest secure release
Upgrade github.com/edgexfoundry/app-service-configurable to 2.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/edgexfoundry/app-functions-sdk-go/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-41278, inspect your project dependencies for Github.com/edgexfoundry/app functions sdk go/v2:
inspect dependencies for github.com/edgexfoundry/app-functions-sdk-go/v2
Analyze the terminal output to locate any version of Github.com/edgexfoundry/app functions 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.0), 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Github.com/edgexfoundry/app functions 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
CVE-2021-41278 Affected Github.com/edgexfoundry/app functions sdk go/v2 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/edgexfoundry/app-functions-sdk-go/v2
|
Go |
< 2.1.0
|
2.1.0
|
|
github.com/edgexfoundry/app-functions-sdk-go
|
Go |
|
|
|
github.com/edgexfoundry/app-service-configurable
|
Go |
< 2.1.0
|
2.1.0
|
References
Frequently Asked Questions
What is CVE-2021-41278?
Which Github.com/edgexfoundry/app functions sdk go/v2 versions are affected?
What version fixes CVE-2021-41278?
Is github.com/edgexfoundry/app-functions-sdk-go/v2 affected?
Is github.com/edgexfoundry/app-functions-sdk-go affected?
What is the CVSS score of CVE-2021-41278?
What CWE is associated with CVE-2021-41278?
How can I check Go dependencies for CVE-2021-41278?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6c7m-qwxj-mvhp",
"modified" : "2021-11-24T19:01:48Z",
"published" : "2021-11-19T20:55:16Z",
"aliases" : [ "CVE-2021-41278" ],
"summary" : "Broken encryption in EdgeX Foundry",
"details" : "### Summary\nBroken encryption in app-functions-sdk “AES” transform in EdgeX Foundry releases prior to Jakarta allows attackers to decrypt messages via unspecified vectors.\n\n### Detailed Description\nThe app-functions-sdk exports an “aes” transform that user scripts can optionally call to encrypt data in the processing pipeline. No decrypt function is provided. Encryption is not enabled by default, but if used, the level of protection may be less than the user may expects due to a broken implementation in https://github.com/edgexfoundry/app-functions-sdk-go/blob/v1.0.0/pkg/transforms/encryption.go \n\nVersion v2.1.0 (EdgeX Foundry Jakarta release and later) of app-functions-sdk-go/v2 deprecates the “aes” transform and provides an improved “aes256” transform in its place. The broken implementation will remain in a deprecated state until it is removed in the next EdgeX major release to avoid breakage of existing software that depends on the broken implementation.\n\n### Impact\nAs the broken transform is a library function that is not invoked by default, users who do not use the AES transform in their processing pipelines are unaffected. Those that are affected are urged to upgrade to the Jakarta EdgeX release and modify processing pipelines to use the new \"aes256\" transform.\n\n#### Vulnerable go modules\n- github.com/edgexfoundry/app-functions-sdk-go < v2.1.0\n- github.com/edgexfoundry/app-functions-sdk-go/v2 < v2.1.0\n- github.com/edgexfoundry/app-service-configurable < v2.1.0\n\n#### Vulnerable containers\n- https://hub.docker.com/r/edgexfoundry/app-service-configurable >= 2.0.0 < v2.1.0\n- https://hub.docker.com/r/edgexfoundry/app-service-configurable-arm64 >= 2.0.0 < 2.1.0\n- https://hub.docker.com/r/edgexfoundry/docker-app-service-configurable < 2.0.0\n- https://hub.docker.com/r/edgexfoundry/docker-app-service-configurable-arm64 < 2.0.0 \n\n#### Vulnerable Snaps\n- https://snapcraft.io/edgex-app-service-configurable >= 2.0.0 < 2.1.0\n\n### Patches\nUpgrade to 2.1.0 version of app-functions-sdk-go/v2, app-service-configurable, and related docker containers shown below and modify user scripts to use the new \"aes256\" transform in place of the existing \"aes\" transform.\n\n#### Patched go modules\n- github.com/edgexfoundry/app-functions-sdk-go/v2 v2.1.0\n- github.com/edgexfoundry/app-service-configurable v2.1.0\n\nModification of user scripts is necessary for full remediation.\n\n#### Patched containers\n- https://hub.docker.com/r/edgexfoundry/app-service-configurable:>=2.1.0\n- https://hub.docker.com/r/edgexfoundry/app-service-configurable-arm64:>=2.1.0\n\nModification of user scripts is necessary for full remediation.\n\n#### Patched Snaps\n- https://snapcraft.io/edgex-app-service-configurable >= 2.1.0\n\nModification of user scripts is necessary for full remediation.\n\n### Workarounds\nIf unable to upgrade, change the processing pipeline to use an HTTPS (TLS 1.3) endpoint to export and skip encryption.\n\n### References\n* [2.0 documentation](https://docs.edgexfoundry.org/2.0/microservices/application/BuiltIn/#aes)\n* [2.1 documentation](https://docs.edgexfoundry.org/2.1/microservices/application/BuiltIn/#encryption-deprecated)\n* [GitHub issue](https://github.com/edgexfoundry/app-functions-sdk-go/issues/968)\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)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/edgexfoundry/app-functions-sdk-go/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/edgexfoundry/app-functions-sdk-go"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 2.1.0"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/edgexfoundry/app-service-configurable"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/edgexfoundry/app-functions-sdk-go/security/advisories/GHSA-6c7m-qwxj-mvhp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41278"
}, {
"type" : "WEB",
"url" : "https://github.com/edgexfoundry/app-functions-sdk-go/commit/8fa13c6388ce76a6b878b54490eac61aa7d81165"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/edgexfoundry/app-functions-sdk-go"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-327" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-18T23:05:06Z",
"nvd_published_at" : "2021-11-19T00:15:00Z"
}
}