Hadithcore
Sunan Abi Dawud, 4414
hasan· Al-Albani

Mujahid said:

“Apponting a way in the verse (iv.15) means prescribed punishment. Sufiyan said: “Punish them “refers to unmarried, and “confine them to houses” refers to the women who are married.

حَدَّثَنَا أَحْمَدُ بْنُ مُحَمَّدِ بْنِ ثَابِتٍ، حَدَّثَنَا مُوسَى، - يَعْنِي ابْنَ مَسْعُودٍ - عَنْ شِبْلٍ، عَنِ ابْنِ أَبِي نَجِيحٍ، عَنْ مُجَاهِدٍ، قَالَ السَّبِيلُ الْحَدُّ قَالَ سُفْيَانُ ‏{‏ فَآذُوهُمَا ‏}‏ الْبِكْرَانِ ‏{‏ فَأَمْسِكُوهُنَّ فِي الْبُيُوتِ ‏}‏ الثَّيِّبَاتِ ‏.‏

References2 variants
In-Book Reference
Book 40, Hadith 64
English Reference
Book 39, Hadith 4400