Sahih Muslim Book 4, Hadith Number 1109.

Chapter : It is allowable to curse Satan during prayer and seek the protection (of the Lord) and minor acts (of commission) in prayer.

Abu Qatada reported: I saw the Messenger of Allah (may peace be upon him) leading the people in prayer with Umama daughter of Abu’l-‘As on his neck; and when he prostrated he put her down.