A lottery smart contract implementation for Greedy 599, an Ethereum gambling game, generates a random value that is predictable via an…
mitre·CWE-338·Published 2018-10-23
A lottery smart contract implementation for Greedy 599, an Ethereum gambling game, generates a random value that is predictable via an external contract call. The developer used the extcodesize() function to prevent a malicious contract from being called, but the attacker can bypass it by writing the core code in the constructor of their exploit code. Therefore, it allows attackers to always win and get rewards.
A lottery smart contract implementation for Greedy 599, an Ethereum gambling game, generates a random value that is predictable via an external contract call. The developer used the extcodesize() function to prevent a malicious contract from being called, but the attacker can bypass it by writing the core code in the constructor of their exploit code. Therefore, it allows attackers to always win and get rewards.
Una implementación de contrato inteligente de lotería para Greedy 599, un token de apuestas de Ethereum, genera un valor aleatorio predecible mediante una llamada externa de contrato. El desarrollador emplea la función extcodesize() para evitar que se llame un contrato malicioso, pero el atacante puede omitirla escribiendo el código del núcleo en el constructor de su código exploit. Por lo tanto, permite que los atacantes ganen siempre y obtengan recompensas.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 2.0 | Primary | NVD | 5.0 | 10.0 | 2.9 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| 3.0 | Primary | NVD | 7.5 | 3.9 | 3.6 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |