I will present the search for the rare decays Bs -> mu+mu- and B^0 -> mu+mu- at the CMS detector performed at a collision energy sqrt(s) = 7 TeV.