CVE-2022-46173: Elrond-GO processing Fallback Search Of SCRs When Vulnerability

HIGH
Advisory Identifier: GHSA-p228-4mrh-ww7r
CVSS 7.2
CWE-669
Published
Advisory Summary

CVE-2022-46173 is a HIGH (CVSS 7.2) fallback search of scrs when vulnerability (CWE-669: Incorrect Resource Transfer Between Spheres) affecting Elrond-GO processing libraries in the Go ecosystem. The issue involves fallback search of scrs when not found in the main cache. Remediation is available by upgrading affected packages to version 1.3.50.

CVE-2022-46173 at a Glance

CVE Identifier CVE-2022-46173
GHSA Identifier GHSA-p228-4mrh-ww7r
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-669: Incorrect Resource Transfer Between Spheres
Affected Product Elrond-GO processing
Package Ecosystem Go
Published Date
Last Updated

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

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

How to Fix CVE-2022-46173

To remediate this vulnerability, upgrade all affected Elrond-GO processing 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/ElrondNetwork/elrond-go fixed: 1.3.50
Upgrade github.com/ElrondNetwork/elrond-go to 1.3.50
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/ElrondNetwork/elrond-go

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-46173, inspect your project dependencies for Elrond-GO processing:

inspect dependencies for github.com/ElrondNetwork/elrond-go

Analyze the terminal output to locate any version of Elrond-GO processing in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.50), 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-669: Incorrect Resource Transfer Between Spheres, where the product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere, in a manner that provides unintended control over that resource. In Elrond-GO processing, 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 Processing issue, nodes are affected when trying to process a cross-shard relayed transaction with a smart contract deploy transaction data. The problem was a bad correlation between the transaction caches and the processing component. If the above-mentioned transaction was sent with more gas than required, the smart contract result (SCR transaction) that should have returned the leftover gas, would have been wrongly added to a cache that the processing unit did not consider. The node stopped notarizing metachain blocks. The fix was actually to extend the SCR transaction search in all other caches if it wasn't found in the correct (expected) sharded-cache. ### Patches All versions >= v1.3.50 will contain this patch ### Workarounds For the moment there is no workaround ### References N/A ### For more information If you have any questions or comments about this advisory: * Open an issue in [elrond-go main repo](https://github.com/ElrondNetwork/elrond-go)

CVE-2022-46173 Affected Elrond-GO processing Versions

1 component(s)
Fixed Versions:
1.3.50
Product / Package Ecosystem Affected Versions Fixed Version
github.com/ElrondNetwork/elrond-go
Go
< 1.3.50
1.3.50

References

Frequently Asked Questions

What is CVE-2022-46173?
CVE-2022-46173 is a security vulnerability in Elrond-GO processing involving fallback search of SCRs when not found in the main cache under CWE-669: Incorrect Resource Transfer Between Spheres.
Which Elrond-GO processing versions are affected?
Affected versions include releases prior to 1.3.50 across affected packages: github.com/ElrondNetwork/elrond-go.
What version fixes CVE-2022-46173?
Upgrading to 1.3.50 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/ElrondNetwork/elrond-go affected?
Yes, github.com/ElrondNetwork/elrond-go is affected in releases prior to 1.3.50. Upgrade your dependency to 1.3.50 or later.
What is the CVSS score of CVE-2022-46173?
CVE-2022-46173 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L.
What CWE is associated with CVE-2022-46173?
CVE-2022-46173 is classified under CWE-669: Incorrect Resource Transfer Between Spheres (The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere, in a manner that provides unintended control over that resource.).
How can I check Go dependencies for CVE-2022-46173?
Run the dependency tree command: 'inspect dependencies for github.com/ElrondNetwork/elrond-go'. 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-p228-4mrh-ww7r",
  "modified" : "2022-12-30T16:57:11Z",
  "published" : "2022-12-30T16:57:11Z",
  "aliases" : [ "CVE-2022-46173" ],
  "summary" : "Elrond-GO processing: fallback search of SCRs when not found in the main cache",
  "details" : "### Impact\nProcessing issue, nodes are affected when trying to process a cross-shard relayed transaction with a smart contract deploy transaction data. The problem was a bad correlation between the transaction caches and the processing component. If the above-mentioned transaction was sent with more gas than required, the smart contract result (SCR transaction) that should have returned the leftover gas, would have been wrongly added to a cache that the processing unit did not consider. The node stopped notarizing metachain blocks. The fix was actually to extend the SCR transaction search in all other caches if it wasn't found in the correct (expected) sharded-cache. \n\n### Patches\nAll versions >= v1.3.50 will contain this patch\n\n### Workarounds\nFor the moment there is no workaround\n\n### References\nN/A\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [elrond-go main repo](https://github.com/ElrondNetwork/elrond-go)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/ElrondNetwork/elrond-go"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.50"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.3.48"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ElrondNetwork/elrond-go/security/advisories/GHSA-p228-4mrh-ww7r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46173"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ElrondNetwork/elrond-go/pull/4718"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ElrondNetwork/elrond-go/commit/39d7ddcb08bb34217dab6daef7cd9d287fb8cab3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ElrondNetwork/elrond-go"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-669" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-30T16:57:11Z",
    "nvd_published_at" : "2022-12-28T07:15:00Z"
  }
}