Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:12:75

˹The brothers˺ said, "Its recompense is that he in whose bag it is found - he ˹himself˺ will be its recompense. Thus do we recompense the wrongdoers."  

They said, ‘His requital (qālū jazā’uhu: the subject, the predicate of which is ˹the following, man wujida fī rahlihi) shall be ˹the requital of˺ him in whose saddlebag it is found, that he be enslaved — this is then reiterated by His words: He, the thief, shall be the requital for it, that is, ˹for˺ the stolen item, and nothing else: this was the customary practice of the family of Jacob. Thus, ˹with such˺ a requital, do we requite those who do evil’, through theft. They thus permitted Joseph to have their saddlebags searched.
القرآن:١٢:٧٥

قَالُوا جَزَاؤُهُ مَنْ وُجِدَ فِي رَحْلِهِ فَهُوَ جَزَاؤُهُ ۚ كَذَٰلِكَ نَجْزِي الظَّالِمِينَ  

{قالوا جزاؤه} مبتدأ خبره {من وجد في رحله} يُسْتَرق ثم أكد بقوله {فهو} أي السارق {جزاؤه} أي المسروق لا غير وكانت سنة آل يعقوب {كذلك} الجزاء {نجزي الظالمين} بالسرقة فصرحوا ليوسف بتفتيش أوعيتهم.