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 package | Versions | Reported by |
|---|---|---|
| ethereum go-ethereum | >= 1.9.7, < 1.9.17 | CVE List |
| github.com/ethereum/go-ethereum (Go) | from 1.9.7 before 1.9.17 | GitHub Advisory Database, Go Vulnerability Database |
| ethereum go_ethereum | before 1.9.17 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| NVD | 7.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L |
| NVD | 5.5medium CVSS:2.0 | AV: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
Xto an EVM memory regionR, - calls
0x00..04withRas an argument, - overwrites
RtoY, - and finally invokes the
RETURNDATACOPYopcode.
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:
- Open an issue in go-ethereum
- Email us at security@ethereum.org
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. 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. El contrato de copia de datos precompilado de Geth (en 0x00 ... 04) hizo una copia superficial en la invocación. 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. 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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-26241 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-69v6-xc2j-r2jf changed 2026-07-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0771 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2020-26241 changed 2026-06-17 | Public domain |