Have you intro any other new foods recently? Who's taking care of your baby now? If it's not yourself, is his caretaker preparing his food hygenically?
If you ruled out all other factors, it might just be the formula. Try changing to another step 2 formula?
Meanwhile, you might want to bring him to a doctor to get diarrhea medicine and also hydrate him adequately