This presentation will show a review of the status of heavy flavor measurements performed with the CMS experiment. Measurements of open b-quark production will be presented. A discussion of the status and prospects of the searches for rare B decays, such as B_s,d -> mu+ mu-, and measurements of CP violation in the B sector will finally be given.