All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
It is permissible in Sharia to undergo cosmetic surgery to remove a defect which is caused by an accident or the like, or a defect which is by birth, or to reduce signs of aging, or for beautification. This is based on the Hadith in which the Prophet permitted for a person whose nose was cut off to replace it with a nose of gold. That Hadith reads as follows: Narrated 'Urfajah bin As'ad: "My nose was severed on the Day of Al-Kulab during Jahiliyyah. So I got a nose of paper that caused me an infection , so the Messenger of Allah (PBUH) ordered me to get a nose made of gold."{At-Tirmizi and others}.
The Prophet`s order to this person was meant to remove harm, but He(PBUH) didn`t prevent him from using silver. Al-Imam Al-Aini(May Allah have mercy on him) said: "Products that remove freckles and beautify a woman`s face for husband are permissible, and this ruling applies to removing hair as well. When Our Mother A`isha was asked about peeling off the face, she replied: "If the skin of the face has changed due to a certain condition, then it is permissible to peel it off." In another narration, " If it was for the husband`s sake, then do it." Abu Obeid reported that the jurists permitted extending hair with any material, except natural hair."{Umdat Al-Qari 20/193}.
However, undertaking unnecessary surgery is prohibited in Sharia for the Hadith where Ibn 'Umar (May Allah be pleased with them) said: "The Messenger of Allah (PBUH) cursed the maker and wearer of a wig and the tattooer and the one who is tattooed."{Muslim}. And Allah knows best.