Cervicitis may be caused by a sexually transmitted infection. But it can also be caused by an allergic reaction or overgrowth of bacteria.