ENOfficial
It was narrated from Ibn ‘Umar that the Messenger of Allah (ﷺ) said: “Whoever does not have sandals let him wear leather socks, and let him cut them to below the ankle.”
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا أَبُو مُصْعَبٍ، حَدَّثَنَا مَالِكُ بْنُ أَنَسٍ، عَنْ نَافِعٍ، وَعَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ قَالَ " مَنْ لَمْ يَجِدْ نَعْلَيْنِ فَلْيَلْبَسْ خُفَّيْنِ وَلْيَقْطَعْهُمَا أَسْفَلَ مِنَ الْكَعْبَيْنِ " .
sunnah.com