KS is caused by infection with the Human Herpesvirus 8 (HHV-8), also known as Kaposi's Sarcoma-associated Herpesvirus (KSHV). While HHV-8 infection is common, not everyone infected with the virus develops KS. The cancer primarily affects individuals with weakened immune systems, such as those with HIV/AIDS or organ transplant recipients who are on immunosuppressive medications.