Abdullah bin Abbas reported,

Temporary marriage existed at the beginning of Islam. A man would arrive in a town where he had no acquaintances, so he would marry a woman for the length of time he expected to stay. She would safeguard his belongings and look after his affairs. This continued until the verse was revealed, "Except from their wives or those their right hands possess" [Muminun 23:6].Ibn Abbas said, "Any private part beyond these two is forbidden."

Tirmidhi 1122

Daif

حدثنا محمود بن غيلان حدثنا سفيان بن عقبة أخو قبيصة بن عقبة حدثنا سفيان الثوري عن موسى بن عبيدة عن محمد بن كعب

عن ابن عباس قال

إنما كانت المتعة في أول الإسلام كان الرجل يقدم البلدة ليس له بها معرفة فيتزوج المرأة بقدر ما يرى أنه يقيم فتحفظ له متاعه وتصلح له شيئه حتى إذا نزلت الآية {إلا على أزواجهم أو ما ملكت أيمانهم} قال ابن عباس فكل فرج سوى هذين فهو حرام

الترمذي 1122ضعيف
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Marriage
Chapter
Prohibition of temporary marriage
Numbering
Darussalam 1122
Tirmidhi 1122