The Book of Marriage
Ṣaḥīḥ Muslim 3422
يَا أَيُّهَا النَّاسُ إِنِّي قَدْ كُنْتُ أَذِنْتُ لَكُمْ فِي الاِسْتِمْتَاعِ مِنَ النِّسَاءِ وَإِنَّ اللَّهَ قَدْ حَرَّمَ ذَلِكَ إِلَى يَوْمِ الْقِيَامَةِ فَمَنْ كَانَ عِنْدَهُ مِنْهُنَّ شَىْءٌ فَلْيُخَلِّ سَبِيلَهُ وَلاَ تَأْخُذُوا مِمَّا آتَيْتُمُوهُنَّ شَيْئًا
yā ayyuhā an-nāsu innī qad kuntu adhintu lakum fī al-istimtāʿi mina an-nisāʾi wa-inna-Llāh qad ḥarrama dhalika ilā yawmi al-qiyāmah faman kāna ʿindah minhunna shayʾun falyukhalli sabīlah walā taʾkhudhūā mimmā ātaytumūhunna shayʾan
Transliteration generated from the Arabic vowel marks
The full narration
Sabra al-Juhani reported on the authority of his father that while he was with Allah's Messenger (ﷺ) he said:O people, I had permitted you to contract temporary marriage with women, but Allah has forbidden it (now) until the Day of Resurrection. So he who has any (woman with this type of marriage contract) he should let her off, and do not take back anything you have given to them (as dower)
Source
Ṣaḥīḥ Muslim · 3422