Doctors can use samples of CSF to find out if a person has a brain infection, like meningitis, encephalitis, or syphilis. CSF samples can also show bleeding from certain parts of the brain. Swelling in the brain, caused by some inflammatory diseases like multiple sclerosis, can show in a CSF sample as well.