Predictable Random Number Generation in PayWinner Function of Ethereum Lottery Smart Contract

Predictable Random Number Generation in PayWinner Function of Ethereum Lottery Smart Contract

CVE-2018-15552 · HIGH Severity

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

The "PayWinner" function of a simplelottery smart contract implementation for The Ethereum Lottery, an Ethereum gambling game, generates a random value with publicly readable variable "maxTickets" (which is private, yet predictable and readable by the eth.getStorageAt function). Therefore, it allows attackers to always win and get rewards.

Learn more about our Web Application Penetration Testing UK.