Ibn Abbas (may Allah be pleased with them both) narrated that he heard Umar bin Khattab (may Allah be pleased with him) say: "Stoning is obligatory according to the command of Allah's Book upon the person, whether man or woman, who commits adultery after marriage, when it is proven by valid Shariah witnesses, or there is pregnancy, or someone confesses himself."
Hadith Referenceمسند الإمام الشافعي / كتاب الحدود / 1571
Hadith Takhrijاخرجه البخاري، الحدود، باب الاعتراف بالزنا (6829) ومسلم، الحدود، باب رجم الثيب في الزني (1691)۔