CVE-2020-26265

CVE-2020-26265 is a medium-severity security vulnerability in github.com/ethereum/go-ethereum (go), affecting versions >= 1.9.4, < 1.9.20. It is fixed in 1.9.20.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Consensus flaw during block processing in github.com/ethereum/go-ethereum

Description

A flaw was repoted at 2020-08-11 by John Youngseok Yang (Software Platform Lab), where a particular sequence of transactions could cause a consensus failure.

  • Tx 1:

    • sender invokes caller.
    • caller invokes 0xaa. 0xaa has 3 wei, does a self-destruct-to-self
    • caller does a 1 wei -call to 0xaa, who thereby has 1 wei (the code in 0xaa still executed, since the tx is still ongoing, but doesn't redo the selfdestruct, it takes a different path if callvalue is non-zero)
  • Tx 2:

    • sender does a 5-wei call to 0xaa. No exec (since no code).

In geth, the result would be that 0xaa had 6 wei, whereas OE reported (correctly) 5 wei. Furthermore, in geth, if the second tx was not executed, the 0xaa would be destructed, resulting in 0 wei. Thus obviously wrong.

It was determined that the root cause was this commit from this PR. The semantics of createObject was subtly changd, into returning a non-nil object (with deleted=true) where it previously did not if the account had been destructed. This return value caused the new object to inherit the old balance:

func (s *StateDB) CreateAccount(addr common.Address) {
	newObj, prev := s.createObject(addr)
	if prev != nil {
		newObj.setBalance(prev.data.Balance)
	}
}

It was determined that the minimal possible correct fix was

+++ b/core/state/statedb.go
@@ -589,7 +589,10 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject)
                s.journal.append(resetObjectChange{prev: prev, prevdestruct: prevdestruct})
        }
        s.setStateObject(newobj)
-       return newobj, prev
+       if prev != nil && !prev.deleted {
+               return newobj, prev
+       }
+       return newobj, nil

Credits

The bug was found by @johnyangk and reported via [email protected].

For more information

If you have any questions or comments about this advisory:

Impact

A consensus-vulnerability in Geth could cause a chain split, where vulnerable versions refuse to accept the canonical chain.

CVE-2020-26265 has a CVSS score of 5.3 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.9.20); upgrading removes the vulnerable code path.

Affected versions

github.com/ethereum/go-ethereum (>= 1.9.4, < 1.9.20)

Security releases

github.com/ethereum/go-ethereum → 1.9.20 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

See above. The fix was included in Geth v1.9.20 "Paragade".

Frequently Asked Questions

  1. What is CVE-2020-26265? CVE-2020-26265 is a medium-severity security vulnerability in github.com/ethereum/go-ethereum (go), affecting versions >= 1.9.4, < 1.9.20. It is fixed in 1.9.20.
  2. How severe is CVE-2020-26265? CVE-2020-26265 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/ethereum/go-ethereum are affected by CVE-2020-26265? github.com/ethereum/go-ethereum (go) versions >= 1.9.4, < 1.9.20 is affected.
  4. Is there a fix for CVE-2020-26265? Yes. CVE-2020-26265 is fixed in 1.9.20. Upgrade to this version or later.
  5. Is CVE-2020-26265 exploitable, and should I be worried? Whether CVE-2020-26265 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2020-26265 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2020-26265? Upgrade github.com/ethereum/go-ethereum to 1.9.20 or later.

Other vulnerabilities in github.com/ethereum/go-ethereum

Stop the waste.
Protect your environment with Kodem.