CVE-2022-36061: Github.com/ElrondNetwork/elrond go Elrond-go Has Improper Initialization Vulnerability
CRITICALCVE-2022-36061 is a CRITICAL (CVSS 9.8) elrond-go has improper initialization vulnerability (CWE-665: Improper Initialization) affecting Github.com/ElrondNetwork/elrond go libraries in the Go ecosystem. The issue involves elrond-go has improper initialization. Remediation is available by upgrading affected packages to version 1.3.35.
CVE-2022-36061 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-36061
To remediate this vulnerability, upgrade all affected Github.com/ElrondNetwork/elrond go 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/ElrondNetwork/elrond-go to 1.3.35
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ElrondNetwork/elrond-go
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-36061, inspect your project dependencies for Github.com/ElrondNetwork/elrond go:
inspect dependencies for github.com/ElrondNetwork/elrond-go
Analyze the terminal output to locate any version of Github.com/ElrondNetwork/elrond go in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.35), 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-665: Improper Initialization, where the product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used. In Github.com/ElrondNetwork/elrond go, 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-2022-36061 Affected Github.com/ElrondNetwork/elrond go Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ElrondNetwork/elrond-go
|
Go |
< 1.3.35
|
1.3.35
|
References
Frequently Asked Questions
What is CVE-2022-36061?
Which Github.com/ElrondNetwork/elrond go versions are affected?
What version fixes CVE-2022-36061?
Is github.com/ElrondNetwork/elrond-go affected?
What is the CVSS score of CVE-2022-36061?
What CWE is associated with CVE-2022-36061?
How can I check Go dependencies for CVE-2022-36061?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mv8x-668m-53fg",
"modified" : "2022-09-16T21:21:43Z",
"published" : "2022-09-16T21:21:43Z",
"aliases" : [ "CVE-2022-36061" ],
"summary" : "Elrond-go has improper initialization",
"details" : "### Impact\nRead only calls between contracts can generate smart contracts results. For example, if contract A calls in read only mode contract B and the called function will make changes upon the contract's B state, the state will be altered for contract B as if the call was not made in the read-only mode. This can lead to some effects not designed by the original smart contracts programmers.\n\n### Patches\nPatch v1.3.35 or higher\n\n### Workarounds\nNo workaround\n\n### References\nFor future reference and understanding of this issue, anyone can check this integration test https://github.com/ElrondNetwork/elrond-go/blob/8e402fa6d7e91e779980122d3798b2bf50892945/integrationTests/vm/txsFee/asyncESDT_test.go#L452 that proves the fix and prevents a future code regression. \n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in elrond-go ([http://github.com/ElrondNetwork/elrond-go/issues](https://github.com/ElrondNetwork/elrond-go/issues))\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ElrondNetwork/elrond-go"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.35"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.3.34"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ElrondNetwork/elrond-go/security/advisories/GHSA-mv8x-668m-53fg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36061"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ElrondNetwork/elrond-go"
}, {
"type" : "WEB",
"url" : "https://github.com/ElrondNetwork/elrond-go/blob/8e402fa6d7e91e779980122d3798b2bf50892945/integrationTests/vm/txsFee/asyncESDT_test.go#L452"
}, {
"type" : "WEB",
"url" : "https://github.com/ElrondNetwork/elrond-go/releases/tag/v1.3.35"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-665" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-16T21:21:43Z",
"nvd_published_at" : "2022-09-06T21:15:00Z"
}
}