Exposure of Resource to Wrong Sphere Affecting github.com/crypto-org-chain/cronos package, versions <0.8.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.1% (43rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMCRYPTOORGCHAINCRONOS-2976189
  • published 7 Aug 2022
  • disclosed 7 Aug 2022
  • credit yihuang, Tomas Tauber

How to fix?

:

If it is not possible to upgrade to the fixed version, the user can redeploy the same contract, i.e. with identical bytecode, so that the original contract's code is recovered. The new contract deployment restores the bytecode hash -> bytecode entry in the internal state.

Overview

github.com/crypto-org-chain/cronos is a Crypto.org EVM Chain which aims to massively scale the DeFi ecosystem. It is powered by Ethermint, a scalable and interoperable Ethereum, built on Proof-of-Stake with fast-finality using the Cosmos SDK.

Affected versions of this package are vulnerable to Exposure of Resource to Wrong Sphere due to a bug in the DeleteAccount function, all contracts sharing identical bytecodes (i.e sharing the same CodeHash) will also stop working once one contract invokes selfdestruct, even though only a single contract invoked the selfdestruct OPCODE.

Remediation:

If it is not possible to upgrade to the fixed version, the user can redeploy the same contract, i.e. with identical bytecode, so that the original contract's code is recovered. The new contract deployment restores the bytecode hash -> bytecode entry in the internal state.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.2 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    Low
  • Availability (A)
    High
Expand this section

NVD

5.3 medium