It is permissible to keep cats in the house, and there is nothing wrong with that because cats are not harmful or naajis (impure).
With regard to cats not being harmful, no one disputes that, rather they are useful because they eat snakes, rats bugs and other things that may be in the house or yard.
With regard to cats not being naajis, this is known from the hadeeth of Kabshah bint Ka’b ibn Maalik, who said that Abu Qutaadah – her husband's father – entered upon her and she poured water for him to do wudoo’, and a cat came to drink from it, so he tipped the vessel for it to drink. Kabshah said: “He saw me looking at him and said, “Do you find it strange, O daughter of my brother?’ I said, ‘Yes.’ He said, ‘The Messenger of Allaah (peace and blessings of Allaah be upon him) said, “They (cats) are not naajis, rather they are of those who go around amongst you.”’”
(Narrated by al-Tirmidhi, 92; al-Nasaa’i, 68; Abu Dawood, 75; Ibn Maajah, 367. classed as saheeh by al-Albaani. Ibn Hajar narrated in al-Talkhees that al-Bukhaari classed it as saheeh).
It was narrated that Ibn ‘Umar (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “A woman entered Hell because of a cat which she tied up and did not feed, nor did she let it loose to feed upon the vermin of the earth.” (Narrated by al-Bukhaari, 3140; Muslim, 2242).
The vermin of the earth means insects and mice, etc.
This hadeeth does not denounce the woman for keeping a cat, but it demonstrates that the woman’s sin was in not feeding it or leaving it to eat from the vermin of the earth.
The great Sahaabi Abu Hurayrah (literally “Father of the Kitten”) was so called because he used to love cats and keep them. He became well known by this name and people forgot his real name, until the scholars disputed concerning his real name and there were nearly thirty different opinions as to what it was. Ibn ‘Abd al-Barr said in al-Istee’aab: “The most correct view is that his name was ‘Abd al-Rahmaan ibn Sakhr but none of them disputed that he was Abu Hurayrah.”
Note: It is permissible to keep cats but it is not permissible to buy or sell them; they may be given as gifts or given away. That is because of the hadeeth of Abu’l-Zubayr who said: “I asked Jaabir about the price of dogs and cats. He said, ‘The Prophet (peace and blessings of Allaah be upon him) forbade that.’” (Narrated by Muslim, 1569).
And Allaah knows best.