My boyfriend hid his exes pregnancy from me

My boyfriend kept a pregnancy from me. His ex is pregnant & he could potentially be the father… I instantly blew up, & freaked out on him… Am I in the wrong? Bc Idk why he would keep it from me if it’s not his kid.