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