If a woman gets an infection while she is pregnant, sometimes the infection can affect her fetus. The placenta protects the fetus from many different viruses, bacteria, and other pathogens that cause infections. However, some pathogens can get through the placenta and infect the fetus. This is called vertical transmission. Some of these infections can cause birth defects.