"The Messenger of Allah ﷺ prohibited the Gharar sale, and the Hasah sale." [He said:] There are narrations on this topic from Ibn 'Umar, Ibn 'Abbas, Abu Sa'eed, and Anas.
نَهَى رَسُولُ اللَّهِ ﷺ عَنْ بَيْعِ الْغَرَرِ وَبَيْعِ الْحَصَاةِ قَالَ وَفِي الْبَابِ عَنِ ابْنِ عُمَرَ وَابْنِ عَبَّاسٍ وَأَبِي سَعِيدٍ وَأَنَسٍ