CVE-2020-26241
JSON

6.5medium

Shallow copy bug in geth

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.23% (higher than 69% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-69v6-xc2j-r2jfGO-2022-0771

Description

Go Ethereum, or "Geth", is the official Golang implementation of the Ethereum protocol. This is a Consensus vulnerability in Geth before version 1.9.17 which can be used to cause a chain-split where vulnerable nodes reject the canonical chain. Geth's pre-compiled dataCopy (at 0x00...04) contract did a shallow copy on invocation. An attacker could deploy a contract that writes X to an EVM memory region R, then calls 0x00..04 with R as an argument, then overwrites R to Y, and finally invokes the RETURNDATACOPY opcode. When this contract is invoked, a consensus-compliant node would push X on the EVM stack, whereas Geth would push Y. This is fixed in version 1.9.17.

Affected

Product or packageVersionsReported by
ethereum go-ethereum>= 1.9.7, < 1.9.17CVE List
github.com/ethereum/go-ethereum (Go)from 1.9.7 before 1.9.17GitHub Advisory Database, Go Vulnerability Database
ethereum go_ethereumbefore 1.9.17NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
NVD7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
NVD5.5medium CVSS:2.0AV:N/AC:L/Au:S/C:N/I:P/A:P

Classification

What each source says

CVE List

Go Ethereum, or "Geth", is the official Golang implementation of the Ethereum protocol. This is a Consensus vulnerability in Geth before version 1.9.17 which can be used to cause a chain-split where vulnerable nodes reject the canonical chain. Geth's pre-compiled dataCopy (at 0x00...04) contract did a shallow copy on invocation. An attacker could deploy a contract that writes X to an EVM memory region R, then calls 0x00..04 with R as an argument, then overwrites R to Y, and finally invokes the RETURNDATACOPY opcode. When this contract is invoked, a consensus-compliant node would push X on the EVM stack, whereas Geth would push Y. This is fixed in version 1.9.17.

GitHub Advisory Database
Impact

This is a Consensus vulnerability, which can be used to cause a chain-split where vulnerable nodes reject the canonical chain.

Geth’s pre-compiled dataCopy (at 0x00...04) contract did a shallow copy on invocation. An attacker could deploy a contract that

  • writes X to an EVM memory region R,
  • calls 0x00..04 with R as an argument,
  • overwrites R to Y,
  • and finally invokes the RETURNDATACOPY opcode.

When this contract is invoked, a consensus-compliant node would push X on the EVM stack, whereas Geth would push Y.

Patches

No standalone patches have been made.

Workarounds

Upgrade to 1.9.17 or higher.

References

https://blog.ethereum.org/2020/11/12/geth_security_release/

For more information

If you have any questions or comments about this advisory:

Go Vulnerability Database

Shallow copy bug in geth in github.com/ethereum/go-ethereum

NVD (es)

Go Ethereum, o "Geth", es la implementación oficial Golang del protocolo Ethereum.&#xa0;Esta es una vulnerabilidad de Consensus en Geth versiones anteriores a 1.9.17 que puede ser usada para causar una división de cadena donde unos nodos vulnerables rechazan la cadena canónica.&#xa0;El contrato de copia de datos precompilado de Geth (en 0x00 ... 04) hizo una copia superficial en la invocación.&#xa0;Un atacante podría implementar un contrato que escribe X en una región de memoria R de EVM, luego llama a 0x00..04 con R como argumento, luego sobrescribe R en Y y finalmente invoca el código de operación RETURNDATACOPY.&#xa0;Cuando este contrato es invocado, un nodo consensus-compliant empujaría X en la pila de EVM, mientras que Geth empujaría Y. Esto es corregido en la versión 1.9.17

References

Sources

SourceRecordLicence
CVE ListCVE-2020-26241 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-69v6-xc2j-r2jf changed 2026-07-08CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0771 changed 2026-03-03CC-BY-4.0
NVDCVE-2020-26241 changed 2026-06-17Public domain