There is a machlokes Rishonim if it's mutar to have a pilegesh, but even if it is theoretically mutar midioraissa, it's practically (l'maaseh) prohibited. I will present sources from many places to paint a unique picture of pilegesh, and many of the involved issues.
The first source is Rashi & Ramban on Breishis 25:6, based on Sanhedrin 21a. The Gemara there says: Nashim (wives) are with kiddushin and kesubah, and pilagshim (concubines) are without kiddushin and kesubah. Rashi in Breishis says "nashim are with kesubah and pilagshim are without kesubah," Ramban asks against Rashi for implying pilegesh has kiddushin, and only lacks kesubah. (One point: Ramban asks that kesubah is only dirabanan, that's not so clear; most rishonim agree with that, but Tosfos, Kesubos 10a s.v. amar brings an opinion that kesubah is dioraissa.) Rashi may be based on Rabi Meir's opinion in Yerushalmi Kesubos 5:2.