The present CMS pixel detector designed for a luminosity of $10^{34}\,\mathrm{cm}^{-2}\mathrm{s}^{-1}$ will have to be replaced at the end of 2016. The new upgraded detector will have higher tracking efficiency and lower mass with four barrel layers and three forward/backward disks to provide a hit coverage up to absolute pseudorapidities of $\mid\eta\mid<2.5$. In a second stage, in order to maintain its physics reach during the high luminosity phase of the LHC (HL-LHC), when the machine is expected to deliver an instantaneous luminosity of $5\times 10^{34}\,\mathrm{cm}^{-2} \mathrm{s}^{-1}$ for a total of $3000\,\mathrm{fb}^{-1}$, CMS will build a new tracker, comprising a completely new pixel detector and outer tracker. The ongoing R\&D a...