M31 and M33 are the closest spiral galaxies and the largest members (together with the Milky Way) of the Local group, which makes them interesting targets for indirect dark matter searches. In this paper we present studies of the expected sensitivity of the Cherenkov Telescope Array (CTA) to an annihilation signal from weakly interacting massive particles from M31 and M33. We show that a 100 h long observation campaign will allow CTA to probe annihilation cross-sections up to 〈συ〉 ≈ 5·10-25 cm3 s-1 for the τ + τ - annihilation channel (for M31, at a DM mass of 0.3 TeV), improving the current limits derived by HAWC by up to an order of magnitude. We present an estimate of the expected CTA sensitivity, by also taking into account the contributions of the astrophysical background and other possible sources of systematic uncertainty. We also show that CTA might be able to detect the extended emission from the bulge of M31, detected at lower energies by the Fermi/LAT.