Exclusive and diffractive physics measurements are important for the better understanding of the non-perturbative regime of QCD. Two recent results of the CMS experiment is presented in this paper. The total and differential cross sections of central exclusive \(\pi^+\pi^-\) production are measured at 5.02 and 13 TeV in the \(p_{\mathrm{T}}(\pi) > 0.2~\)GeV/\(c\) and \(|\eta(\pi)| < 2.4\) kinematic region. The invariant mass distribution is fitted by the sum of a continuum and four interfering relativistic Breit-Wigner functions. In the second part of the paper the measurement of the single diffractive dijets is presented, which are studied by using proton tagging capabilities of the TOTEM analysis. A joint CMS-TOTEM study is carried out and the total and differential cross sections are measured in the \(0.03 < |t| < 1.0~\)GeV\(^2\) and \(0 < \xi < 0.1\) kinematic region.