Two women were sewing leather in a house, or in a room, when one of them came out with an awl driven through the palm of her hand. She accused the other woman of doing it. The case was brought before Ibn Abbas, who said, "The Messenger of Allah ﷺ said, 'If people were granted whatever they claimed, men would lose their lives and their wealth. Remind her of Allah, and recite to her, 'Indeed, those who exchange the covenant of Allah' [Aal Imran 3:77].'"So they reminded her, and she confessed.Ibn Abbas then said, "The Prophet ﷺ said, 'The oath is upon the one against whom the claim is made.'"
أن امرأتين كانتا تخرزان في بيت- أو في الحجرة- فخرجت إحداهما وقد أنفذ بإشفى في كفها، فادعت على الأخرى، فرفع إلى ابن عباس، فقال ابن عباس: قال رسول الله ﷺ: لو يعطى الناس بدعواهم لذهب دماء قوم وأموالهم ذكروها بالله، واقرؤوا عليها: {إن الذين يشترون بعهد الله} فذكروها فاعترفت، فقال ابن عباس: قال النبي ﷺ: اليمين على المدعى عليه.
Bukhari related it in the tafsir (4552) from Nasr bin Ali bin Nasr, who said, Abdullah bin Dawud told us, from Ibn Jurayj, from Ibn Abu Mulayka, and he mentioned it.Muslim related it in the rulings (1711) through another route from Ibn Jurayj with the same chain, but he confined himself to the part attributed to the Prophet only, and did not mention the story.There are other hadiths conveying the same meaning, which have already been referenced in the book of sales.