Exposure of Resource to Wrong Sphere Affecting github.com/evmos/ethermint package, versions <0.18.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.13% (50th 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 Learn

Learn about Exposure of Resource to Wrong Sphere vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMEVMOSETHERMINT-2976187
  • published7 Aug 2022
  • disclosed7 Aug 2022
  • credityihuang, Tomas Tauber

Introduced: 7 Aug 2022

CVE-2022-35936  (opens in a new tab)
CWE-400  (opens in a new tab)
CWE-668  (opens in a new tab)

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/evmos/ethermint is a scalable and interoperable Ethereum library, 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