Rabies is most often transmitted through a bite from an infected animal. Less frequently, it can be passed on when the saliva of an infected animal enters another animal's body through mucous membranes or an open, fresh wound. The risk for contracting rabies runs highest if your cat is exposed to wild animals.
Feral cats differ from stray cats, because they have never been socialized to humans. ... “All rabid cats are incidental victims and acquire their rabies infections from wildlife.” It's rarely cats who spread rabies, but unvaccinated wild animals such as raccoons, rats, foxes, and bats.