The Messenger of Allah ﷺ said, "An orphan girl must be consulted regarding her own marriage. If she remains silent, that is her consent, and if she refuses, no marriage may be imposed on her."
أخبرنا عمرو بن علي قال حدثنا يحيى قال حدثنا محمد بن عمرو قال حدثنا أبو سلمة
قال رسول الله ﷺ تستأمر اليتيمة في نفسها فإن سكتت فهو إذنها وإن أبت فلا جواز عليها
[Its isnad is hasan] Reported by Abu Dawud, Nikah, chapter titled "Concerning consultation," no. 2093, and Tirmidhi, Nikah, chapter titled "What has been said about compelling an orphan girl to marry," no. 1109, from the hadith of Muhammad bin Amr, with this wording. It is also in al-Kubra, no. 5381. Tirmidhi said, "Hasan." Ibn Hibban graded it sahih, no. 1239, 1240.