Praise be to Allah.
There is nothing wrong with kissing mahrams, such as if a man kisses his mother or sister or daughter, or kissing his paternal aunt or maternal aunt, if there is no risk of temptation and provided that this kissing is by way of compassion and affection, not by way of joking and fooling about, let alone kissing with desire.
There is also nothing wrong with a man kissing the little daughter of his brother or his sister. But in the case of a young woman who is married, that is not appropriate, unless she is elderly and there is no fear (of temptation) with regard to kissing her. That is because the Shaytan flows through the son of Adam like blood, and there is the fear that kissing may provoke desire or the Shaytan may put thoughts in his mind that are not appropriate.
If the man is young and his sister’s daughter is also young, then kissing and hugging her is a reprehensible action; it is likely to provoke desire and lead to evil consequences. Therefore, you have done well to tell her not to do that, and she is obliged to obey you and to not let him into the house when you are absent. Carelessness in such matters is indicative of a lack of protective jealousy. How much pain and sorrow have resulted from that, especially nowadays, when piety is weak and prudence is rare. This is not an accusation against the mahram; rather it is helping him to do good and is protecting him against corruption and evil. Islam came to ward off evils and to bring that which is in people’s best interests, and to bar the ways that lead to temptation.
Among the things that should be denounced is that which has become widespread in some societies of young people kissing one another when they meet; some of them have gone further and have started to kiss their mahrams every time they see them. Even worse than all of that is kissing one’s cousins (daughters of paternal uncles and aunts, and daughters of maternal uncles and aunts). This is an effect of foreign customs that have come to the Muslims. Otherwise, it was not customary among the Muslims to kiss in this manner. Kissing one’s cousins is clearly haram, because they are non-mahrams and it is not permissible to shake hands with them, let alone kiss them.
At-Tirmidhi (2728) narrated that Anas ibn Malik (may Allah be pleased with him) said: A man said: O Messenger of Allah, one of us may meet his brother or friend; can he bow to him? He said: “No.” He said: Then may he hug him and kiss him? He said: “No.” He said: Then may he take his hand and shake hands with him? He said: “Yes.”
Classed as hasan by al-Albani in Saheeh Sunan at-Tirmidhi.
The Standing Committee for Issuing Fatwas was asked: There is a phenomenon of younger people kissing one another on the cheek every time they meet, every day. This phenomenon has spread even among imams, and in the mosque, and in the classroom. Is that contrary to the Sunnah, or is anything wrong with it, or is it a bid‘ah or sin, or is it permissible?
What is prescribed when meeting is to greet with salam and shake hands. If they meet after returning from a journey, then it is also prescribed to embrace, because it is proven that Anas (may Allah be pleased with him) said: When the Companions of the Prophet (blessings and peace of Allah be upon him) met one another they would shake hands, and if they had come from a journey they would embrace. As for kissing on the cheeks, we do not know of anything in the Sunnah that indicates that.
End quote. Fatawa al-Lajnah ad-Daimah (24/128)
May Allah help us all to do that which He loves and is pleased with.
And Allah knows best.