Litter box problems can be extremely stressful and difficult to deal with, but there are many ways to successfully resolve issues of inappropriate littering.
Don’t punish your cat! Although you may regard your cat or kitten’s inappropriate house soiling as spiteful, a cat with litter box problems either has a medical problems or is following natural instincts. Harsh treatment only contributes to a cat’s stress, and may worsen the problem.
Please refer to this ASPCA article for more information.