All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
According to the majority of scholars, eating rats is prohibited for two reasons: forbidding the eating of their meat and ordering Muslims to kill them.
‘Aa’ishah reported that the Prophet, sallallaahu ‘alayhi wa sallam, said, “Five vicious animals that are to be killed even in the Haram (sacred precincts of the Ka‘bah): the rat, the scorpion, the kite, the crow and the rabid dog.”
With regard to eating the mentioned kind of rats, it may be prohibited for a greater reason; that it feeds on dirt and impurities, according to what we have been told by specialists, which makes it similar to Jallaalah (the animal that feeds on filth) whose flesh is forbidden to be eaten. It was narrated on the authority of Ibn ‘Umar that the Prophet, sallallaahu ‘alayhi wa sallam, prohibited eating the Jallaalah and drinking its milk. [Abu Daawood and At-Tirmithi]
Allaah Knows best.